> ## 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.

# Moneybird API reference

> API reference for the Moneybird plugin in Corsair: every `moneybird.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).

## Administrations

### list

`administrations.list`

List the administrations the token can access, with id, name, currency and access level

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.administrations.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   language?: string | null,
>   currency?: string | null,
>   country?: string | null,
>   time_zone?: string | null,
>   access?: string | null,
>   suspended?: boolean | null,
>   period_locked_until?: string | null | null,
>   period_start_date?: string | null
> }[]
> ```

***

## Assets

### create

`assets.create`

Create a new asset (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.assets.create({
	asset: {
		name: 'Website Relaunch',
		ledger_account_id: '458026356994737217',
		purchase_date: '2026-04-09',
		purchase_value: '100.00',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `asset` | `object` | No | — |

> [accordion] asset full type
>
> ```ts theme={null}
> {
>   name: string,
>   ledger_account_id: string | number,
>   purchase_date: string,
>   purchase_value: string | number | null,
>   value_change_plan_attributes?: {
>     lifespan_in_years: string | number | null,
>     residual_value?: string | number | null
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `purchase_date` | `string \| null` | No | — |
| `purchase_value` | `string \| number \| null \| null` | No | — |
| `calculated_purchase_value` | `string \| number \| null \| null` | No | — |
| `current_value` | `string \| number \| null \| null` | No | — |
| `value_change_plan` | `object \| null` | No | — |
| `disposal` | `object \| null` | No | — |
| `value_changes` | `object[] \| null` | No | — |
| `sources` | `object[] \| null` | No | — |
| `reinvestment_reserve_purchase` | `object \| null` | No | — |

> [accordion] value\_change\_plan full type
>
> ```ts theme={null}
> {
>   lifespan_in_years?: number | null,
>   residual_value?: string | number | null | null,
>   active?: boolean | null,
>   monthly_depreciation?: string | number | null | null
> } | null | null
> ```

> [accordion] disposal full type
>
> ```ts theme={null}
> {
>   date?: string | null,
>   reason?: string | null,
>   externally_booked?: boolean | null,
>   asset_id?: string | number | null,
>   reinvestment_reserve_sale?: {
>     id?: string | number | null,
>     amount?: string | number | null | null,
>     date?: string | null,
>     disposal_id?: string | number | null
>   } | null | null
> } | null | null
> ```

> [accordion] value\_changes full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   date?: string | null,
>   amount?: string | number | null | null,
>   description?: string | null | null,
>   externally_booked?: boolean | null,
>   asset_id?: string | number | null
> }[] | null
> ```

> [accordion] sources full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   asset_id?: string | number | null,
>   detail_id?: string | number | null,
>   general_journal_document_entry_id?: string | number | null
> }[] | null
> ```

> [accordion] reinvestment\_reserve\_purchase full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   amount?: string | number | null | null,
>   date?: string | null,
>   asset_id?: string | number | null
> } | null | null
> ```

***

### delete

`assets.delete`

Delete an asset (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.assets.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### disposals.create

`assets.disposals.create`

Create a disposal (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.assets.disposals.create({ id: '458026356994737217', date: '2026-04-09', reason: 'out_of_use' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `date` | `string` | Yes | Has to be after the purchase date of the asset, and cannot be in the future or in the locked period of the administration. |
| `reason` | `out_of_use \| sold \| private_withdrawal \| divested` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `date` | `string \| null` | No | — |
| `reason` | `string \| null` | No | — |
| `externally_booked` | `boolean \| null` | No | — |
| `asset_id` | `string \| number \| null` | No | A unique record identifier |
| `reinvestment_reserve_sale` | `object \| null` | No | — |

> [accordion] reinvestment\_reserve\_sale full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   amount?: string | number | null | null,
>   date?: string | null,
>   disposal_id?: string | number | null
> } | null | null
> ```

***

### get

`assets.get`

Get an asset by ID (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.assets.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `purchase_date` | `string \| null` | No | — |
| `purchase_value` | `string \| number \| null \| null` | No | — |
| `calculated_purchase_value` | `string \| number \| null \| null` | No | — |
| `current_value` | `string \| number \| null \| null` | No | — |
| `value_change_plan` | `object \| null` | No | — |
| `disposal` | `object \| null` | No | — |
| `value_changes` | `object[] \| null` | No | — |
| `sources` | `object[] \| null` | No | — |
| `reinvestment_reserve_purchase` | `object \| null` | No | — |

> [accordion] value\_change\_plan full type
>
> ```ts theme={null}
> {
>   lifespan_in_years?: number | null,
>   residual_value?: string | number | null | null,
>   active?: boolean | null,
>   monthly_depreciation?: string | number | null | null
> } | null | null
> ```

> [accordion] disposal full type
>
> ```ts theme={null}
> {
>   date?: string | null,
>   reason?: string | null,
>   externally_booked?: boolean | null,
>   asset_id?: string | number | null,
>   reinvestment_reserve_sale?: {
>     id?: string | number | null,
>     amount?: string | number | null | null,
>     date?: string | null,
>     disposal_id?: string | number | null
>   } | null | null
> } | null | null
> ```

> [accordion] value\_changes full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   date?: string | null,
>   amount?: string | number | null | null,
>   description?: string | null | null,
>   externally_booked?: boolean | null,
>   asset_id?: string | number | null
> }[] | null
> ```

> [accordion] sources full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   asset_id?: string | number | null,
>   detail_id?: string | number | null,
>   general_journal_document_entry_id?: string | number | null
> }[] | null
> ```

> [accordion] reinvestment\_reserve\_purchase full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   amount?: string | number | null | null,
>   date?: string | null,
>   asset_id?: string | number | null
> } | null | null
> ```

***

### list

`assets.list`

List all assets, one page at a time (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.assets.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ledger_account_id` | `string \| number` | No | A unique record identifier |
| `active` | `boolean \| string` | No | Whether to include only active assets |
| `per_page` | `number \| string` | No | — |
| `page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   name?: string | null,
>   purchase_date?: string | null,
>   purchase_value?: string | number | null | null,
>   calculated_purchase_value?: string | number | null | null,
>   current_value?: string | number | null | null,
>   value_change_plan?: {
>     lifespan_in_years?: number | null,
>     residual_value?: string | number | null | null,
>     active?: boolean | null,
>     monthly_depreciation?: string | number | null | null
>   } | null | null,
>   disposal?: {
>     date?: string | null,
>     reason?: string | null,
>     externally_booked?: boolean | null,
>     asset_id?: string | number | null,
>     reinvestment_reserve_sale?: {
>       id?: string | number | null,
>       amount?: string | number | null | null,
>       date?: string | null,
>       disposal_id?: string | number | null
>     } | null | null
>   } | null | null,
>   value_changes?: {
>     type?: string | null,
>     date?: string | null,
>     amount?: string | number | null | null,
>     description?: string | null | null,
>     externally_booked?: boolean | null,
>     asset_id?: string | number | null
>   }[] | null,
>   sources?: {
>     id?: string | number | null,
>     asset_id?: string | number | null,
>     detail_id?: string | number | null,
>     general_journal_document_entry_id?: string | number | null
>   }[] | null,
>   reinvestment_reserve_purchase?: {
>     id?: string | number | null,
>     amount?: string | number | null | null,
>     date?: string | null,
>     asset_id?: string | number | null
>   } | null | null
> }[]
> ```

***

### reinvestmentReservePurchase.create

`assets.reinvestmentReservePurchase.create`

Create a reinvestment reserve purchase: records that part of the asset's purchase value is funded from the reinvestment reserve ("herinvesteringsreserve") (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.assets.reinvestmentReservePurchase.create({ id: '458026356994737217', amount: '121.00' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `amount` | `string \| number \| null` | Yes | An amount of money. Both a decimal and a string '10,95' are accepted. A string is bound to the same range as a number, -1,000,000,000 \<= *n* \<= 1,000,000,000. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `amount` | `string \| number \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `asset_id` | `string \| number \| null` | No | A unique record identifier |

***

### reinvestmentReservePurchase.delete

`assets.reinvestmentReservePurchase.delete`

Delete a reinvestment reserve purchase: removes the reinvestment reserve purchase from the asset (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.assets.reinvestmentReservePurchase.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### reinvestmentReserveSale.create

`assets.reinvestmentReserveSale.create`

Create a reinvestment reserve sale: books the book result of the asset's disposal to the reinvestment reserve ("herinvesteringsreserve") (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.assets.reinvestmentReserveSale.create({ id: '458026356994737217', amount: '121.00' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `amount` | `string \| number \| null` | Yes | An amount of money. Both a decimal and a string '10,95' are accepted. A string is bound to the same range as a number, -1,000,000,000 \<= *n* \<= 1,000,000,000. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `amount` | `string \| number \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `disposal_id` | `string \| number \| null` | No | A unique record identifier |

***

### reinvestmentReserveSale.delete

`assets.reinvestmentReserveSale.delete`

Delete a reinvestment reserve sale: removes the reinvestment reserve sale from the asset's disposal (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.assets.reinvestmentReserveSale.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### sources.create

`assets.sources.create`

Add a source to an asset: adds a detail or general journal document entry as a source to an asset (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.assets.sources.create({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `asset_id` | `string \| number \| null` | No | A unique record identifier |
| `detail_id` | `string \| number \| null` | No | A unique record identifier |
| `general_journal_document_entry_id` | `string \| number \| null` | No | A unique record identifier |

***

### sources.delete

`assets.sources.delete`

Delete a source (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.assets.sources.delete({ id: '458026356994737217', source_id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `source_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### update

`assets.update`

Update an asset (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.assets.update({
	id: '458026356994737217',
	asset: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `asset` | `object` | Yes | — |

> [accordion] asset full type
>
> ```ts theme={null}
> {
>   name?: string,
>   ledger_account_id?: string | number,
>   purchase_date?: string,
>   purchase_value?: string | number | null,
>   value_change_plan_attributes?: {
>     lifespan_in_years?: string | number | null,
>     residual_value?: string | number | null
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `purchase_date` | `string \| null` | No | — |
| `purchase_value` | `string \| number \| null \| null` | No | — |
| `calculated_purchase_value` | `string \| number \| null \| null` | No | — |
| `current_value` | `string \| number \| null \| null` | No | — |
| `value_change_plan` | `object \| null` | No | — |
| `disposal` | `object \| null` | No | — |
| `value_changes` | `object[] \| null` | No | — |
| `sources` | `object[] \| null` | No | — |
| `reinvestment_reserve_purchase` | `object \| null` | No | — |

> [accordion] value\_change\_plan full type
>
> ```ts theme={null}
> {
>   lifespan_in_years?: number | null,
>   residual_value?: string | number | null | null,
>   active?: boolean | null,
>   monthly_depreciation?: string | number | null | null
> } | null | null
> ```

> [accordion] disposal full type
>
> ```ts theme={null}
> {
>   date?: string | null,
>   reason?: string | null,
>   externally_booked?: boolean | null,
>   asset_id?: string | number | null,
>   reinvestment_reserve_sale?: {
>     id?: string | number | null,
>     amount?: string | number | null | null,
>     date?: string | null,
>     disposal_id?: string | number | null
>   } | null | null
> } | null | null
> ```

> [accordion] value\_changes full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   date?: string | null,
>   amount?: string | number | null | null,
>   description?: string | null | null,
>   externally_booked?: boolean | null,
>   asset_id?: string | number | null
> }[] | null
> ```

> [accordion] sources full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   asset_id?: string | number | null,
>   detail_id?: string | number | null,
>   general_journal_document_entry_id?: string | number | null
> }[] | null
> ```

> [accordion] reinvestment\_reserve\_purchase full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   amount?: string | number | null | null,
>   date?: string | null,
>   asset_id?: string | number | null
> } | null | null
> ```

***

### valueChanges.createArbitrary

`assets.valueChanges.createArbitrary`

Create an arbitrary value change (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.assets.valueChanges.createArbitrary({
	id: '458026356994737217',
	date: '2026-04-09',
	amount: '121.00',
	description: 'Consulting April',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `date` | `string` | Yes | Has to be after the purchase date of the asset, and cannot be in the future or in the locked period of the administration. |
| `amount` | `string \| number \| null` | Yes | An amount of money. Both a decimal and a string '10,95' are accepted. A string is bound to the same range as a number, -1,000,000,000 \<= *n* \<= 1,000,000,000. |
| `description` | `string` | Yes | — |
| `externally_booked` | `boolean` | No | Set to true if the value change is already externally booked and doesn't need to be booked by Moneybird. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | — |
| `date` | `string \| null` | No | — |
| `amount` | `string \| number \| null \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `externally_booked` | `boolean \| null` | No | — |
| `asset_id` | `string \| number \| null` | No | A unique record identifier |

***

### valueChanges.createDivestment

`assets.valueChanges.createDivestment`

Create a divestment value change (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.assets.valueChanges.createDivestment({ id: '458026356994737217', date: '2026-04-09' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `date` | `string` | Yes | Has to be after the purchase date of the asset, and cannot be in the future or in the locked period of the administration. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | — |
| `date` | `string \| null` | No | — |
| `amount` | `string \| number \| null \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `externally_booked` | `boolean \| null` | No | — |
| `asset_id` | `string \| number \| null` | No | A unique record identifier |

***

### valueChanges.createFullDepreciation

`assets.valueChanges.createFullDepreciation`

Create a full depreciation value change (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.assets.valueChanges.createFullDepreciation({ id: '458026356994737217', date: '2026-04-09', description: 'Consulting April' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `date` | `string` | Yes | Has to be after the purchase date of the asset, and cannot be in the future or in the locked period of the administration. |
| `description` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | — |
| `date` | `string \| null` | No | — |
| `amount` | `string \| number \| null \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `externally_booked` | `boolean \| null` | No | — |
| `asset_id` | `string \| number \| null` | No | A unique record identifier |

***

### valueChanges.createManual

`assets.valueChanges.createManual`

Create a manual value change (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.assets.valueChanges.createManual({
	id: '458026356994737217',
	date: '2026-04-09',
	amount: '121.00',
	description: 'Consulting April',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `date` | `string` | Yes | Has to be after the purchase date of the asset, and cannot be in the future or in the locked period of the administration. |
| `amount` | `string \| number \| null` | Yes | An amount of money. Both a decimal and a string '10,95' are accepted. A string is bound to the same range as a number, -1,000,000,000 \<= *n* \<= 1,000,000,000. |
| `description` | `string` | Yes | — |
| `externally_booked` | `boolean` | No | Set to true if the value change is already externally booked and doesn't need to be booked by Moneybird. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | — |
| `date` | `string \| null` | No | — |
| `amount` | `string \| number \| null \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `externally_booked` | `boolean \| null` | No | — |
| `asset_id` | `string \| number \| null` | No | A unique record identifier |

***

### valueChanges.createRetroactiveLinear

`assets.valueChanges.createRetroactiveLinear`

Create linear value changes retroactively (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.assets.valueChanges.createRetroactiveLinear({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

## Contacts

### additionalCharges.create

`contacts.additionalCharges.create`

Create an additional charge to be invoiced at start of next period: at the end of the current period, the additional charges for a contact are merged where possible and an invoice will be created for them (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.contacts.additionalCharges.create({
	id: '458026356994737217',
	product_id: '440009337465900001',
	amount: '121.00',
	period: '202604',
	description: 'Consulting April',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `product_id` | `string \| number` | Yes | A unique record identifier |
| `amount` | `string \| number` | Yes | The quantity on the invoice line, e.g. `1` or `5 x`. |
| `price` | `string \| number \| null` | No | An amount of money. Both a decimal and a string '10,95' are accepted. A string is bound to the same range as a number, -1,000,000,000 \<= *n* \<= 1,000,000,000. |
| `period` | `string` | Yes | The period the charge applies to, e.g. `20250101..20250131`, `202501..202503` or `this_month`. |
| `description` | `string` | Yes | — |
| `identifier` | `string` | No | Your own reference for this charge. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `product_id` | `string \| number \| null` | No | A unique record identifier |
| `detail_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `amount` | `string \| null \| null` | No | — |
| `price` | `string \| null` | No | — |
| `period` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |

***

### additionalCharges.list

`contacts.additionalCharges.list`

Get additional charges: get the additional charges of the given contact (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.contacts.additionalCharges.list({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `include_billed` | `boolean \| string` | No | If true, includes the additional charges that have already been billed. Default is false. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   subscription_id?: string | number | null | null,
>   product_id?: string | number | null,
>   detail_id?: string | number | null | null,
>   amount?: string | null | null,
>   price?: string | null,
>   period?: string | null,
>   description?: string | null
> }[]
> ```

***

### archive

`contacts.archive`

Archive a contact: archives a contact (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.contacts.archive({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### contactPeople.create

`contacts.contactPeople.create`

Create a new contact person: creating a new contact person in the administration requires at least a `contact_person` hash including `firstname` and `lastname` (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.contacts.contactPeople.create({
	contact_id: '387172987357643188',
	contact_person: { firstname: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |
| `contact_person` | `object` | No | — |

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   firstname?: string,
>   lastname?: string,
>   phone?: string,
>   email?: string,
>   department?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `firstname` | `string \| null \| null` | No | — |
| `lastname` | `string \| null \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `department` | `string \| null \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |

***

### contactPeople.delete

`contacts.contactPeople.delete`

Delete a contact person (scopes: any of estimates, sales\_invoices, documents, bank or settings)

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

```ts theme={null}
await corsair.moneybird.api.contacts.contactPeople.delete({ contact_id: '387172987357643188', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### contactPeople.get

`contacts.contactPeople.get`

Get contact person (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.contacts.contactPeople.get({ contact_id: '387172987357643188', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `firstname` | `string \| null \| null` | No | — |
| `lastname` | `string \| null \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `department` | `string \| null \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |

***

### contactPeople.update

`contacts.contactPeople.update`

Update a contact person: when updating a contact, you only need to provide the information you want to change (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.contacts.contactPeople.update({
	contact_id: '387172987357643188',
	id: '458026356994737217',
	contact_person: { firstname: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `contact_person` | `object` | No | — |

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   firstname?: string,
>   lastname?: string,
>   phone?: string,
>   email?: string,
>   department?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `firstname` | `string \| null \| null` | No | — |
| `lastname` | `string \| null \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `department` | `string \| null \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |

***

### create

`contacts.create`

Create a new contact: creating a new contact in the administration requires at least a `company_name` or a `firstname` and `lastname` (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.contacts.create({
	contact: {
		company_name: 'Beachy BV',
		firstname: 'Jana',
		lastname: 'Berger',
		country: 'NL',
		send_invoices_to_email: 'billing@example.com',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact` | `object` | Yes | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   company_name?: string,
>   address1?: string,
>   address2?: string,
>   zipcode?: string,
>   city?: string,
>   country?: string,
>   phone?: string,
>   delivery_method?: string,
>   customer_id?: string,
>   tax_number?: string,
>   firstname?: string,
>   lastname?: string,
>   chamber_of_commerce?: string,
>   bank_account?: string,
>   send_invoices_to_attention?: string,
>   send_invoices_to_email?: string,
>   send_estimates_to_attention?: string,
>   send_estimates_to_email?: string,
>   send_reminders_to_attention?: string,
>   send_reminders_to_email?: string,
>   sepa_active?: boolean | string,
>   sepa_iban?: string,
>   sepa_iban_account_name?: string,
>   sepa_bic?: string,
>   sepa_mandate_id?: string,
>   sepa_mandate_date?: string,
>   sepa_sequence_type?: string,
>   si_identifier_type?: string,
>   si_identifier?: string,
>   invoice_workflow_id?: string | number,
>   estimate_workflow_id?: string | number,
>   email_ubl?: boolean | string,
>   direct_debit?: boolean | string,
>   custom_fields_attributes?: Record<string, {
>     id: string | number,
>     value: string
>   }> | {
>     id?: string | number,
>     value?: string
>   }[],
>   contact_person?: {
>     firstname: string,
>     lastname: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `company_name` | `any \| null` | No | — |
| `firstname` | `string \| null \| null` | No | — |
| `lastname` | `string \| null \| null` | No | — |
| `address1` | `string \| null \| null` | No | — |
| `address2` | `string \| null \| null` | No | — |
| `zipcode` | `string \| null \| null` | No | — |
| `city` | `string \| null \| null` | No | — |
| `country` | `string \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `delivery_method` | `string \| null \| null` | No | — |
| `customer_id` | `string \| null` | No | Will be assigned automatically if empty |
| `tax_number` | `string \| null \| null` | No | — |
| `chamber_of_commerce` | `string \| null \| null` | No | — |
| `bank_account` | `string \| null \| null` | No | The SEPA IBAN of the contact, can be empty if no SEPA IBAN is set |
| `is_trusted` | `boolean \| null` | No | — |
| `max_transfer_amount` | `string \| null \| null` | No | — |
| `attention` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `email_ubl` | `boolean \| null` | No | — |
| `send_invoices_to_attention` | `string \| null \| null` | No | — |
| `send_invoices_to_email` | `string \| null \| null` | No | — |
| `send_estimates_to_attention` | `string \| null \| null` | No | — |
| `send_estimates_to_email` | `string \| null \| null` | No | — |
| `send_reminders_to_attention` | `string \| null \| null` | No | — |
| `send_reminders_to_email` | `string \| null \| null` | No | — |
| `direct_debit` | `boolean \| null` | No | — |
| `sepa_active` | `boolean \| null \| null` | No | — |
| `sepa_iban` | `string \| null \| null` | No | — |
| `sepa_iban_account_name` | `string \| null \| null` | No | — |
| `sepa_bic` | `string \| null \| null` | No | — |
| `sepa_mandate_id` | `string \| null \| null` | No | — |
| `sepa_mandate_date` | `string \| null \| null` | No | — |
| `sepa_sequence_type` | `string \| null` | No | — |
| `credit_card_number` | `string \| null \| null` | No | — |
| `credit_card_reference` | `string \| null \| null` | No | — |
| `credit_card_type` | `string \| null \| null` | No | — |
| `tax_number_validated_at` | `string \| null \| null` | No | — |
| `tax_number_valid` | `boolean \| null \| null` | No | — |
| `invoice_workflow_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `estimate_workflow_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `si_identifier` | `string \| null \| null` | No | — |
| `si_identifier_type` | `string \| null \| null` | No | — |
| `moneybird_payments_mandate` | `boolean \| null` | No | Whether the contact has a valid Moneybird Payments mandate |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `sales_invoices_url` | `string \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `contact_people` | `object[] \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] contact\_people full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### delete

`contacts.delete`

Delete a contact (scopes: any of estimates, sales\_invoices, documents, bank or settings)

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

```ts theme={null}
await corsair.moneybird.api.contacts.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### fetchByIds

`contacts.fetchByIds`

Fetch contacts with given ids: given a list of contact ids, returns the contact information belonging to the contacts (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.contacts.fetchByIds({
	ids: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ids` | `(number \| string)[]` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: any | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### filter

`contacts.filter`

Filter contacts, one page at a time (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.contacts.filter({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `first_name:henk,contact_type:company`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| - \| - \| - \| - \| \| created\_after \| `String` \| \| Select contacts created after the given time (exclusive). ISO 8601 formatted string. The time to compare with is in UTC timezone \| \| updated\_after \| `String` \| \| Select contacts updated after the given time (exclusive). ISO 8601 formatted string. The time to compare with is in UTC timezone \| \| first\_name \| `String` \| \| Select contacts with the given first name. Case-insensitive \| \| last\_name \| `String` \| \| Select contacts with the given last name. Case-insensitive \| \| estimate\_workflow\_id \| `Integer` \| \| Filters contacts by a single Estimate workflow \| \| invoice\_workflow\_id \| `Integer` \| \| Filters contacts by a single Invoice workflow \| \| contact\_type \| `String` \| \| The contact type. Possible values `all`, `company`, `private_individual` \| \| delivery\_method \| `String` \| \| The delivery method for invoices. Possible values. Possible values `all`, `email`, `post`, `manual`, `peppol`, `simplerinvoicing` \| \| trusted\_type \| `String` \| \| Whether the contact is trusted. Possible values `all`, `trusted`, `not_trusted` \| \| mandate\_type \| `String` \| \| The direct debit mandate of the contact. Possible values `all`, `manual` (the SEPA mandate fields are filled in), `adyen` (an accepted Moneybird mandate), `none` (no mandate at all) \| |
| `query` | `string` | No | Free-text search across name, contact people, email, phone, customer id, tax number, chamber of commerce, IBAN, and address fields. |
| `include_archived` | `boolean \| string` | No | — |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: any | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### get

`contacts.get`

Get contact (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.contacts.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `include_archived` | `boolean \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `company_name` | `any \| null` | No | — |
| `firstname` | `string \| null \| null` | No | — |
| `lastname` | `string \| null \| null` | No | — |
| `address1` | `string \| null \| null` | No | — |
| `address2` | `string \| null \| null` | No | — |
| `zipcode` | `string \| null \| null` | No | — |
| `city` | `string \| null \| null` | No | — |
| `country` | `string \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `delivery_method` | `string \| null \| null` | No | — |
| `customer_id` | `string \| null` | No | Will be assigned automatically if empty |
| `tax_number` | `string \| null \| null` | No | — |
| `chamber_of_commerce` | `string \| null \| null` | No | — |
| `bank_account` | `string \| null \| null` | No | The SEPA IBAN of the contact, can be empty if no SEPA IBAN is set |
| `is_trusted` | `boolean \| null` | No | — |
| `max_transfer_amount` | `string \| null \| null` | No | — |
| `attention` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `email_ubl` | `boolean \| null` | No | — |
| `send_invoices_to_attention` | `string \| null \| null` | No | — |
| `send_invoices_to_email` | `string \| null \| null` | No | — |
| `send_estimates_to_attention` | `string \| null \| null` | No | — |
| `send_estimates_to_email` | `string \| null \| null` | No | — |
| `send_reminders_to_attention` | `string \| null \| null` | No | — |
| `send_reminders_to_email` | `string \| null \| null` | No | — |
| `direct_debit` | `boolean \| null` | No | — |
| `sepa_active` | `boolean \| null \| null` | No | — |
| `sepa_iban` | `string \| null \| null` | No | — |
| `sepa_iban_account_name` | `string \| null \| null` | No | — |
| `sepa_bic` | `string \| null \| null` | No | — |
| `sepa_mandate_id` | `string \| null \| null` | No | — |
| `sepa_mandate_date` | `string \| null \| null` | No | — |
| `sepa_sequence_type` | `string \| null` | No | — |
| `credit_card_number` | `string \| null \| null` | No | — |
| `credit_card_reference` | `string \| null \| null` | No | — |
| `credit_card_type` | `string \| null \| null` | No | — |
| `tax_number_validated_at` | `string \| null \| null` | No | — |
| `tax_number_valid` | `boolean \| null \| null` | No | — |
| `invoice_workflow_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `estimate_workflow_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `si_identifier` | `string \| null \| null` | No | — |
| `si_identifier_type` | `string \| null \| null` | No | — |
| `moneybird_payments_mandate` | `boolean \| null` | No | Whether the contact has a valid Moneybird Payments mandate |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `sales_invoices_url` | `string \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `contact_people` | `object[] \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] contact\_people full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### getByCustomerId

`contacts.getByCustomerId`

Get contact by customer id (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.contacts.getByCustomerId({ customer_id: 'C-1001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `customer_id` | `string` | Yes | The customer number of the contact, not the contact's id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `company_name` | `any \| null` | No | — |
| `firstname` | `string \| null \| null` | No | — |
| `lastname` | `string \| null \| null` | No | — |
| `address1` | `string \| null \| null` | No | — |
| `address2` | `string \| null \| null` | No | — |
| `zipcode` | `string \| null \| null` | No | — |
| `city` | `string \| null \| null` | No | — |
| `country` | `string \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `delivery_method` | `string \| null \| null` | No | — |
| `customer_id` | `string \| null` | No | Will be assigned automatically if empty |
| `tax_number` | `string \| null \| null` | No | — |
| `chamber_of_commerce` | `string \| null \| null` | No | — |
| `bank_account` | `string \| null \| null` | No | The SEPA IBAN of the contact, can be empty if no SEPA IBAN is set |
| `is_trusted` | `boolean \| null` | No | — |
| `max_transfer_amount` | `string \| null \| null` | No | — |
| `attention` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `email_ubl` | `boolean \| null` | No | — |
| `send_invoices_to_attention` | `string \| null \| null` | No | — |
| `send_invoices_to_email` | `string \| null \| null` | No | — |
| `send_estimates_to_attention` | `string \| null \| null` | No | — |
| `send_estimates_to_email` | `string \| null \| null` | No | — |
| `send_reminders_to_attention` | `string \| null \| null` | No | — |
| `send_reminders_to_email` | `string \| null \| null` | No | — |
| `direct_debit` | `boolean \| null` | No | — |
| `sepa_active` | `boolean \| null \| null` | No | — |
| `sepa_iban` | `string \| null \| null` | No | — |
| `sepa_iban_account_name` | `string \| null \| null` | No | — |
| `sepa_bic` | `string \| null \| null` | No | — |
| `sepa_mandate_id` | `string \| null \| null` | No | — |
| `sepa_mandate_date` | `string \| null \| null` | No | — |
| `sepa_sequence_type` | `string \| null` | No | — |
| `credit_card_number` | `string \| null \| null` | No | — |
| `credit_card_reference` | `string \| null \| null` | No | — |
| `credit_card_type` | `string \| null \| null` | No | — |
| `tax_number_validated_at` | `string \| null \| null` | No | — |
| `tax_number_valid` | `boolean \| null \| null` | No | — |
| `invoice_workflow_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `estimate_workflow_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `si_identifier` | `string \| null \| null` | No | — |
| `si_identifier_type` | `string \| null \| null` | No | — |
| `moneybird_payments_mandate` | `boolean \| null` | No | Whether the contact has a valid Moneybird Payments mandate |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `sales_invoices_url` | `string \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `contact_people` | `object[] \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] contact\_people full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### list

`contacts.list`

List all contacts, one page at a time (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.contacts.list({ per_page: 100, query: 'Beachy' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `per_page` | `number \| string` | No | — |
| `page` | `number \| string` | No | — |
| `query` | `string` | No | Free-text search across name, contact people, email, phone, customer id, tax number, chamber of commerce, IBAN, and address fields. |
| `include_archived` | `boolean \| string` | No | — |
| `todo` | `string` | No | — |
| `contact_field` | `string` | No | — |
| `contact_value` | `string` | No | — |
| `contact_import_id` | `number \| string` | No | Restrict to contacts created by the given contact import batch. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: any | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### listDuplicates

`contacts.listDuplicates`

List possible duplicate contacts, one page at a time (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.contacts.listDuplicates({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   contacts?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   }[] | null
> }[]
> ```

***

### listVersions

`contacts.listVersions`

List all ids and versions (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.contacts.listVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Comma-separated `key:value` filter terms. Same syntax as `GET /contacts/filter` — see that operation's description for the available keys. |
| `include_archived` | `boolean \| string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   version?: number | string | null
> }[]
> ```

***

### notes.create

`contacts.notes.create`

Adds note to entity: adds a note to the contact (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.contacts.notes.create({
	contact_id: '387172987357643188',
	note: { note: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |
| `note` | `object` | No | — |

> [accordion] note full type
>
> ```ts theme={null}
> {
>   note?: string,
>   todo?: boolean | string,
>   assignee_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `entity_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `entity_type` | `string \| null` | No | — |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo` | `boolean \| string \| null \| null` | No | — |
| `note` | `string \| null \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `completed_by_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo_type` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

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

***

### notes.delete

`contacts.notes.delete`

Destroys note from entity (scopes: any of estimates, sales\_invoices, documents, bank or settings)

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

```ts theme={null}
await corsair.moneybird.api.contacts.notes.delete({ contact_id: '387172987357643188', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### paymentsMandate.createUrl

`contacts.paymentsMandate.createUrl`

Request an URL for setting up a Moneybird Payments mandate: obtains an URL for setting up a Moneybird Payments mandate (scopes: sales\_invoices and settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.contacts.paymentsMandate.createUrl({
	contact_id: '387172987357643188',
	mandate_request: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |
| `mandate_request` | `object` | No | — |

> [accordion] mandate\_request full type
>
> ```ts theme={null}
> {
>   identity_id?: string | number,
>   workflow_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string \| null` | No | — |

***

### paymentsMandate.delete

`contacts.paymentsMandate.delete`

Delete a stored Moneybird Payments mandate (scopes: any of estimates, sales\_invoices, documents, bank or settings)

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

```ts theme={null}
await corsair.moneybird.api.contacts.paymentsMandate.delete({ contact_id: '387172987357643188' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### paymentsMandate.get

`contacts.paymentsMandate.get`

Get Moneybird Payments mandate (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.contacts.paymentsMandate.get({ contact_id: '387172987357643188' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null \| null` | No | — |
| `sepa_mandate` | `boolean \| null` | No | — |
| `bank` | `string \| null \| null` | No | — |
| `iban` | `string \| null \| null` | No | — |
| `bic` | `string \| null \| null` | No | — |
| `iban_account_name` | `string \| null \| null` | No | — |
| `card_expiry_month` | `string \| null \| null` | No | — |
| `card_expiry_year` | `string \| null \| null` | No | — |
| `card_final_digits` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |

***

### paymentsMandate.request

`contacts.paymentsMandate.request`

Email the contact a request to set up a Moneybird Payments direct debit mandate (they pay 15 cents to confirm) (scopes: sales\_invoices and settings)

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

```ts theme={null}
await corsair.moneybird.api.contacts.paymentsMandate.request({
	contact_id: '387172987357643188',
	mandate_request: { email_message: 'jana.berger@example.com' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |
| `mandate_request` | `object` | No | — |

> [accordion] mandate\_request full type
>
> ```ts theme={null}
> {
>   email_message?: string,
>   identity_id?: string | number,
>   workflow_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### update

`contacts.update`

Update a contact: when updating a contact, you only need to provide the information you want to change (scopes: any of estimates, sales\_invoices, documents, bank or settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.contacts.update({
	id: '387172987357643188',
	contact: { city: 'Amsterdam' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `contact` | `object` | Yes | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   company_name?: string,
>   address1?: string,
>   address2?: string,
>   zipcode?: string,
>   city?: string,
>   country?: string,
>   phone?: string,
>   delivery_method?: string,
>   email_ubl?: boolean | string,
>   customer_id?: string,
>   tax_number?: string,
>   firstname?: string,
>   lastname?: string,
>   chamber_of_commerce?: string,
>   bank_account?: string,
>   send_invoices_to_attention?: string,
>   send_invoices_to_email?: string,
>   send_estimates_to_attention?: string,
>   send_estimates_to_email?: string,
>   send_reminders_to_attention?: string,
>   send_reminders_to_email?: string,
>   sepa_active?: boolean | string,
>   sepa_iban?: string,
>   sepa_iban_account_name?: string,
>   sepa_bic?: string,
>   sepa_mandate_id?: string,
>   sepa_mandate_date?: string,
>   sepa_sequence_type?: string,
>   invoice_workflow_id?: string | number,
>   estimate_workflow_id?: string | number,
>   si_identifier_type?: string,
>   si_identifier?: string,
>   direct_debit?: boolean | string,
>   custom_fields_attributes?: Record<string, {
>     id: string | number,
>     value: string
>   }> | {
>     id?: string | number,
>     value?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `company_name` | `any \| null` | No | — |
| `firstname` | `string \| null \| null` | No | — |
| `lastname` | `string \| null \| null` | No | — |
| `address1` | `string \| null \| null` | No | — |
| `address2` | `string \| null \| null` | No | — |
| `zipcode` | `string \| null \| null` | No | — |
| `city` | `string \| null \| null` | No | — |
| `country` | `string \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `delivery_method` | `string \| null \| null` | No | — |
| `customer_id` | `string \| null` | No | Will be assigned automatically if empty |
| `tax_number` | `string \| null \| null` | No | — |
| `chamber_of_commerce` | `string \| null \| null` | No | — |
| `bank_account` | `string \| null \| null` | No | The SEPA IBAN of the contact, can be empty if no SEPA IBAN is set |
| `is_trusted` | `boolean \| null` | No | — |
| `max_transfer_amount` | `string \| null \| null` | No | — |
| `attention` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `email_ubl` | `boolean \| null` | No | — |
| `send_invoices_to_attention` | `string \| null \| null` | No | — |
| `send_invoices_to_email` | `string \| null \| null` | No | — |
| `send_estimates_to_attention` | `string \| null \| null` | No | — |
| `send_estimates_to_email` | `string \| null \| null` | No | — |
| `send_reminders_to_attention` | `string \| null \| null` | No | — |
| `send_reminders_to_email` | `string \| null \| null` | No | — |
| `direct_debit` | `boolean \| null` | No | — |
| `sepa_active` | `boolean \| null \| null` | No | — |
| `sepa_iban` | `string \| null \| null` | No | — |
| `sepa_iban_account_name` | `string \| null \| null` | No | — |
| `sepa_bic` | `string \| null \| null` | No | — |
| `sepa_mandate_id` | `string \| null \| null` | No | — |
| `sepa_mandate_date` | `string \| null \| null` | No | — |
| `sepa_sequence_type` | `string \| null` | No | — |
| `credit_card_number` | `string \| null \| null` | No | — |
| `credit_card_reference` | `string \| null \| null` | No | — |
| `credit_card_type` | `string \| null \| null` | No | — |
| `tax_number_validated_at` | `string \| null \| null` | No | — |
| `tax_number_valid` | `boolean \| null \| null` | No | — |
| `invoice_workflow_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `estimate_workflow_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `si_identifier` | `string \| null \| null` | No | — |
| `si_identifier_type` | `string \| null \| null` | No | — |
| `moneybird_payments_mandate` | `boolean \| null` | No | Whether the contact has a valid Moneybird Payments mandate |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `sales_invoices_url` | `string \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `contact_people` | `object[] \| null` | No | — |
| `archived` | `boolean \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] contact\_people full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

## Customer Contact Portal

### get

`customerContactPortal.get`

Get a temporary link to the customer contact portal: generate a temporary link to the customer contact portal (scopes: any of sales\_invoices or estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.customerContactPortal.get({ contact_id: '387172987357643188' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |

**Output:** `string`

***

### getSubscription

`customerContactPortal.getSubscription`

Get a temporary link to the subscriptions in the customer contact portal: generate a temporary link to the subscriptions in the customer contact portal (scopes: any of sales\_invoices or estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.customerContactPortal.getSubscription({ contact_id: '387172987357643188', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output:** `string`

***

### listInvoices

`customerContactPortal.listInvoices`

Get a temporary link to the invoices in the customer contact portal: generate a temporary link to the invoices in the customer contact portal (scopes: any of sales\_invoices or estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.customerContactPortal.listInvoices({ contact_id: '387172987357643188' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |

**Output:** `string`

***

## Custom Fields

### list

`customFields.list`

List all custom fields: custom fields are used to add extra information to entities in the administration (scopes: any of settings, sales\_invoices, documents, estimates or bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.customFields.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   administration_id?: string | number | null | null,
>   name?: string | null,
>   source?: string | null | null
> }[]
> ```

***

## Documents

### generalDocuments.attachments.create

`documents.generalDocuments.attachments.create`

Add attachment to general document: add an attachment to a general document (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.attachments.create({
	id: '458026356994737217',
	file: { base64: 'JVBERi0xLjQKJSVFT0YK', filename: 'invoice.pdf', contentType: 'application/pdf' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `file` | `string \| object \| custom` | No | A file: a public URL to it, or \{url, filename?, contentType?}, or \{base64, filename?, contentType?} for a small one. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `number`

***

### generalDocuments.attachments.delete

`documents.generalDocuments.attachments.delete`

Delete an attachment (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.attachments.delete({ id: '458026356994737217', attachment_id: '442001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `attachment_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### generalDocuments.attachments.download

`documents.generalDocuments.attachments.download`

Download attachment: download the attachment (returned as a file) (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.attachments.download({ id: '458026356994737217', attachment_id: '442001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `attachment_id` | `string \| number` | Yes | A unique record identifier |

**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. |

***

### generalDocuments.create

`documents.generalDocuments.create`

Create a new general document (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.create({
	general_document: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `general_document` | `object` | No | — |

> [accordion] general\_document full type
>
> ```ts theme={null}
> {
>   reference?: string,
>   date?: string,
>   due_date?: string,
>   reminder_date?: string,
>   contact_id?: string | number,
>   reminder?: {
>     date: string,
>     message?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `due_date` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `exchange_rate` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### generalDocuments.delete

`documents.generalDocuments.delete`

Delete a general document (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output:** `number \| object`

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

***

### generalDocuments.fetchByIds

`documents.generalDocuments.fetchByIds`

Fetch general documents with given ids: given a list of document ids, returns the document information belonging to the documents (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.fetchByIds({
	ids: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ids` | `(number \| string)[]` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   reference?: string | null | null,
>   date?: string | null,
>   due_date?: string | null | null,
>   entry_number?: number | null | null,
>   state?: string | null,
>   exchange_rate?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### generalDocuments.get

`documents.generalDocuments.get`

Get general document (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `due_date` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `exchange_rate` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### generalDocuments.list

`documents.generalDocuments.list`

Get general documents, one page at a time (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:open`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| - \| - \| - \| - \| \| period \| `String` \| `this_year` \| A named period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom range (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| state \| `String` \| `all` \| `all`, `new`, `saved`, `open`, `paid`, `late` or `pending_payment`. `paid`, `late` and `pending_payment` only apply to documents with a payment lifecycle (purchase invoices and receipts) \| \| recurring \| `String` \| `all` \| `all`, `enabled` or `disabled` \| \| attachment \| `String` \| `all` \| `all`, `with` or `without` \| \| reference \| `String` \| \| Documents with the given reference value \| \| contact\_id \| `Integer` \| \| Documents belonging to the given contact \| \| ledger\_account\_id \| `Integer` \| \| Documents booking against the given ledger account \| \| updated\_after \| `String` \| \| ISO 8601 timestamp in UTC; documents updated strictly after this time \| Multiple values for `state`, `recurring` and `attachment` can be combined with a pipe, e.g. `state:open\|paid`. |
| `new_filter` | `string` | No | String terms, example: `key1:value1,key2:value2`. |
| `page` | `number \| string` | No | — |
| `sort` | `date_desc \| date_asc` | No | Sorts the list on date, so the newest (`date_desc`) or the oldest (`date_asc`) items come first. |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   reference?: string | null | null,
>   date?: string | null,
>   due_date?: string | null | null,
>   entry_number?: number | null | null,
>   state?: string | null,
>   exchange_rate?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### generalDocuments.listVersions

`documents.generalDocuments.listVersions`

List ids and versions of general documents (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.listVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Comma-separated `key:value` filter terms. Same syntax as `GET /documents/general_documents` — see that operation's description for the available keys. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   version?: number | string | null
> }[]
> ```

***

### generalDocuments.notes.create

`documents.generalDocuments.notes.create`

Adds note to entity: adds a note to the general document (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.notes.create({
	general_document_id: '458026356994737217',
	note: { note: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `general_document_id` | `string \| number` | Yes | A unique record identifier |
| `note` | `object` | No | — |

> [accordion] note full type
>
> ```ts theme={null}
> {
>   note?: string,
>   todo?: boolean | string,
>   assignee_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `entity_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `entity_type` | `string \| null` | No | — |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo` | `boolean \| string \| null \| null` | No | — |
| `note` | `string \| null \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `completed_by_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo_type` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

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

***

### generalDocuments.notes.delete

`documents.generalDocuments.notes.delete`

Destroys note from entity (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.notes.delete({ general_document_id: '458026356994737217', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `general_document_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### generalDocuments.update

`documents.generalDocuments.update`

Update a general document (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.generalDocuments.update({
	id: '458026356994737217',
	general_document: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `general_document` | `object` | No | — |
| `remove_contact` | `boolean \| string` | No | — |

> [accordion] general\_document full type
>
> ```ts theme={null}
> {
>   reference?: string,
>   date?: string,
>   due_date?: string,
>   reminder_date?: string,
>   contact_id?: string | number,
>   reminder?: {
>     date: string,
>     message?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `due_date` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `exchange_rate` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### generalJournalDocuments.attachments.create

`documents.generalJournalDocuments.attachments.create`

Add attachment to general journal document: add an attachment to a general journal document (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.attachments.create({
	id: '458026356994737217',
	file: { base64: 'JVBERi0xLjQKJSVFT0YK', filename: 'invoice.pdf', contentType: 'application/pdf' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `file` | `string \| object \| custom` | No | A file: a public URL to it, or \{url, filename?, contentType?}, or \{base64, filename?, contentType?} for a small one. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `number`

***

### generalJournalDocuments.attachments.delete

`documents.generalJournalDocuments.attachments.delete`

Delete an attachment (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.attachments.delete({ id: '458026356994737217', attachment_id: '442001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `attachment_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### generalJournalDocuments.attachments.download

`documents.generalJournalDocuments.attachments.download`

Download attachment: download the attachment (returned as a file) (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.attachments.download({ id: '458026356994737217', attachment_id: '442001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `attachment_id` | `string \| number` | Yes | A unique record identifier |

**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. |

***

### generalJournalDocuments.create

`documents.generalJournalDocuments.create`

Create a new general journal document (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.create({
	general_journal_document: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `general_journal_document` | `object` | No | — |

> [accordion] general\_journal\_document full type
>
> ```ts theme={null}
> {
>   reference?: string,
>   date?: string,
>   journal_type?: fiscal_year_ending,
>   general_journal_document_entries_attributes?: {
>     id?: number,
>     ledger_account_id?: string | number,
>     tax_rate_id?: string | number,
>     description?: string,
>     debit?: string | number | null,
>     credit?: string | number | null,
>     project_id?: string | number,
>     row_order?: number,
>     _destroy?: boolean | string,
>     contact_id?: string | number
>   }[] | Record<string, {
>     id?: number,
>     ledger_account_id?: string | number,
>     tax_rate_id?: string | number,
>     description?: string,
>     debit?: string | number | null,
>     credit?: string | number | null,
>     project_id?: string | number,
>     row_order?: number,
>     _destroy?: boolean | string,
>     contact_id?: string | number
>   }>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `journal_type` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `general_journal_document_entries` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] general\_journal\_document\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   debit?: string | null,
>   credit?: string | null,
>   row_order?: number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   description?: string | null | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### generalJournalDocuments.delete

`documents.generalJournalDocuments.delete`

Delete a general journal document (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output:** `number \| object`

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

***

### generalJournalDocuments.fetchByIds

`documents.generalJournalDocuments.fetchByIds`

Fetch general journal documents with given ids: given a list of document ids, returns the document information belonging to the documents (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.fetchByIds({
	ids: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ids` | `(number \| string)[]` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   reference?: string | null | null,
>   date?: string | null,
>   journal_type?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   general_journal_document_entries?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     debit?: string | null,
>     credit?: string | null,
>     row_order?: number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     description?: string | null | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### generalJournalDocuments.get

`documents.generalJournalDocuments.get`

Get general journal document (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `journal_type` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `general_journal_document_entries` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] general\_journal\_document\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   debit?: string | null,
>   credit?: string | null,
>   row_order?: number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   description?: string | null | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### generalJournalDocuments.list

`documents.generalJournalDocuments.list`

Get general journal documents, one page at a time (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:open`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| - \| - \| - \| - \| \| period \| `String` \| `this_year` \| A named period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom range (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| state \| `String` \| `all` \| `all`, `new`, `saved`, `open`, `paid`, `late` or `pending_payment`. `paid`, `late` and `pending_payment` only apply to documents with a payment lifecycle (purchase invoices and receipts) \| \| recurring \| `String` \| `all` \| `all`, `enabled` or `disabled` \| \| attachment \| `String` \| `all` \| `all`, `with` or `without` \| \| reference \| `String` \| \| Documents with the given reference value \| \| contact\_id \| `Integer` \| \| Documents belonging to the given contact \| \| ledger\_account\_id \| `Integer` \| \| Documents booking against the given ledger account \| \| updated\_after \| `String` \| \| ISO 8601 timestamp in UTC; documents updated strictly after this time \| Multiple values for `state`, `recurring` and `attachment` can be combined with a pipe, e.g. `state:open\|paid`. |
| `new_filter` | `string` | No | String terms, example: `key1:value1,key2:value2`. |
| `page` | `number \| string` | No | — |
| `sort` | `date_desc \| date_asc` | No | Sorts the list on date, so the newest (`date_desc`) or the oldest (`date_asc`) items come first. |
| `per_page` | `number \| string` | No | — |
| `exclude_new_general_journal_documents` | `boolean \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   reference?: string | null | null,
>   date?: string | null,
>   journal_type?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   general_journal_document_entries?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     debit?: string | null,
>     credit?: string | null,
>     row_order?: number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     description?: string | null | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### generalJournalDocuments.listVersions

`documents.generalJournalDocuments.listVersions`

List ids and versions of general journal documents (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.listVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Comma-separated `key:value` filter terms. Same syntax as `GET /documents/general_journal_documents` — see that operation's description for the available keys. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   version?: number | string | null
> }[]
> ```

***

### generalJournalDocuments.notes.create

`documents.generalJournalDocuments.notes.create`

Adds note to entity: adds a note to the general journal document (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.notes.create({
	general_journal_document_id: '458026356994737217',
	note: { note: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `general_journal_document_id` | `string \| number` | Yes | A unique record identifier |
| `note` | `object` | No | — |

> [accordion] note full type
>
> ```ts theme={null}
> {
>   note?: string,
>   todo?: boolean | string,
>   assignee_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `entity_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `entity_type` | `string \| null` | No | — |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo` | `boolean \| string \| null \| null` | No | — |
| `note` | `string \| null \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `completed_by_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo_type` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

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

***

### generalJournalDocuments.notes.delete

`documents.generalJournalDocuments.notes.delete`

Destroys note from entity (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.notes.delete({ general_journal_document_id: '458026356994737217', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `general_journal_document_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### generalJournalDocuments.update

`documents.generalJournalDocuments.update`

Update a general journal document (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.generalJournalDocuments.update({
	id: '458026356994737217',
	general_journal_document: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `general_journal_document` | `object` | No | — |
| `all_taxes` | `boolean \| string` | No | — |

> [accordion] general\_journal\_document full type
>
> ```ts theme={null}
> {
>   reference?: string,
>   date?: string,
>   journal_type?: fiscal_year_ending | "",
>   general_journal_document_entries_attributes?: {
>     id?: number,
>     ledger_account_id?: string | number,
>     tax_rate_id?: string | number,
>     description?: string,
>     debit?: string | number | null,
>     credit?: string | number | null,
>     project_id?: string | number,
>     row_order?: number,
>     _destroy?: boolean | string,
>     contact_id?: string | number
>   }[] | Record<string, {
>     id?: number,
>     ledger_account_id?: string | number,
>     tax_rate_id?: string | number,
>     description?: string,
>     debit?: string | number | null,
>     credit?: string | number | null,
>     project_id?: string | number,
>     row_order?: number,
>     _destroy?: boolean | string,
>     contact_id?: string | number
>   }>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `journal_type` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `general_journal_document_entries` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] general\_journal\_document\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   debit?: string | null,
>   credit?: string | null,
>   row_order?: number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   description?: string | null | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### purchaseInvoices.attachments.create

`documents.purchaseInvoices.attachments.create`

Add attachment to purchase invoice: add an attachment to a purchase invoice (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.attachments.create({
	id: '458026356994737217',
	file: { base64: 'JVBERi0xLjQKJSVFT0YK', filename: 'invoice.pdf', contentType: 'application/pdf' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `file` | `string \| object \| custom` | No | A file: a public URL to it, or \{url, filename?, contentType?}, or \{base64, filename?, contentType?} for a small one. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `number`

***

### purchaseInvoices.attachments.delete

`documents.purchaseInvoices.attachments.delete`

Delete an attachment (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.attachments.delete({ id: '458026356994737217', attachment_id: '442001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `attachment_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### purchaseInvoices.attachments.download

`documents.purchaseInvoices.attachments.download`

Download attachment: download the attachment (returned as a file) (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.attachments.download({ id: '458026356994737217', attachment_id: '442001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `attachment_id` | `string \| number` | Yes | A unique record identifier |

**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. |

***

### purchaseInvoices.create

`documents.purchaseInvoices.create`

Create a new purchase invoice (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.create({
	purchase_invoice: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `purchase_invoice` | `object` | No | — |

> [accordion] purchase\_invoice full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number,
>   reference?: string,
>   date?: string,
>   due_date?: string,
>   currency?: string,
>   prices_are_incl_tax?: boolean | string,
>   revenue_invoice?: boolean | string,
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[],
>   fiscal_allocations_attributes?: Record<string, {
>     id?: string | number,
>     ledger_account_id?: string | number,
>     private_ledger_account_id?: string | number,
>     percentage?: string | number | null,
>     _destroy?: boolean | string
>   }> | {
>     id?: string | number,
>     ledger_account_id?: string | number,
>     private_ledger_account_id?: string | number,
>     percentage?: string | number | null,
>     _destroy?: boolean | string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `currency` | `string \| null` | No | ISO 4217 currency code |
| `exchange_rate` | `string \| null \| null` | No | — |
| `revenue_invoice` | `boolean \| null \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `tax_number` | `string \| null \| null` | No | — |
| `total_price_excl_tax` | `string \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `fiscal_allocations` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] fiscal\_allocations full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   private_ledger_account_id?: string | number | null,
>   percentage?: string | number | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### purchaseInvoices.delete

`documents.purchaseInvoices.delete`

Delete a purchase invoices (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output:** `number \| object`

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

***

### purchaseInvoices.fetchByIds

`documents.purchaseInvoices.fetchByIds`

Fetch purchase invoices with given ids: given a list of document ids, returns the document information belonging to the documents (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.fetchByIds({
	ids: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ids` | `(number \| string)[]` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   reference?: string | null | null,
>   date?: string | null,
>   due_date?: string | null | null,
>   entry_number?: number | null | null,
>   state?: string | null,
>   currency?: string | null,
>   exchange_rate?: string | null | null,
>   revenue_invoice?: boolean | null | null,
>   prices_are_incl_tax?: boolean | null | null,
>   origin?: string | null | null,
>   paid_at?: string | null | null,
>   tax_number?: string | null | null,
>   total_price_excl_tax?: string | null | null,
>   total_price_excl_tax_base?: string | null | null,
>   total_price_incl_tax?: string | null | null,
>   total_price_incl_tax_base?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   fiscal_allocations?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     private_ledger_account_id?: string | number | null,
>     percentage?: string | number | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### purchaseInvoices.get

`documents.purchaseInvoices.get`

Get purchase invoice (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `currency` | `string \| null` | No | ISO 4217 currency code |
| `exchange_rate` | `string \| null \| null` | No | — |
| `revenue_invoice` | `boolean \| null \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `tax_number` | `string \| null \| null` | No | — |
| `total_price_excl_tax` | `string \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `fiscal_allocations` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] fiscal\_allocations full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   private_ledger_account_id?: string | number | null,
>   percentage?: string | number | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### purchaseInvoices.list

`documents.purchaseInvoices.list`

Get purchase invoices, one page at a time (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:open`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| - \| - \| - \| - \| \| period \| `String` \| `this_year` \| Matches on the document date. A named period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom range (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| state \| `String` \| `all` \| `all`, `new`, `saved`, `open`, `paid`, `late` or `pending_payment`. `paid`, `late` and `pending_payment` only apply to documents with a payment lifecycle (purchase invoices and receipts) \| \| recurring \| `String` \| `all` \| `all`, `enabled` or `disabled` \| \| attachment \| `String` \| `all` \| `all`, `with` or `without` \| \| automatic\_saving \| `String` \| `all` \| `all`, `automatic` or `manual`. `automatic` matches documents Moneybird saved by itself after analysing them; `manual` matches everything else, including documents nobody has saved yet \| \| reference \| `String` \| \| Documents with the given reference value \| \| contact\_id \| `Integer` \| \| Documents belonging to the given contact \| \| ledger\_account\_id \| `Integer` \| \| Documents booking against the given ledger account \| \| updated\_after \| `String` \| \| ISO 8601 timestamp in UTC; documents updated strictly after this time \| The `period` filter matches on the document date. It does not look at the `period` of the individual details, which says which months the expenses belong to. Read `details[].period` in the response when you need those months, or use the reports endpoints, which already spread the amounts over that period. A detail's period can fall outside the filtered range, however wide you make it, so this filter cannot tell you which periods amounts fall in. Use the reports endpoints for that. Multiple values for `state`, `recurring` and `attachment` can be combined with a pipe, e.g. `state:open\|paid`. |
| `new_filter` | `string` | No | String terms, example: `key1:value1,key2:value2`. |
| `page` | `number \| string` | No | — |
| `sort` | `date_desc \| date_asc` | No | Sorts the list on date, so the newest (`date_desc`) or the oldest (`date_asc`) items come first. |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   reference?: string | null | null,
>   date?: string | null,
>   due_date?: string | null | null,
>   entry_number?: number | null | null,
>   state?: string | null,
>   currency?: string | null,
>   exchange_rate?: string | null | null,
>   revenue_invoice?: boolean | null | null,
>   prices_are_incl_tax?: boolean | null | null,
>   origin?: string | null | null,
>   paid_at?: string | null | null,
>   tax_number?: string | null | null,
>   total_price_excl_tax?: string | null | null,
>   total_price_excl_tax_base?: string | null | null,
>   total_price_incl_tax?: string | null | null,
>   total_price_incl_tax_base?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   fiscal_allocations?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     private_ledger_account_id?: string | number | null,
>     percentage?: string | number | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### purchaseInvoices.listVersions

`documents.purchaseInvoices.listVersions`

List ids and versions of purchase invoices (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.listVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Comma-separated `key:value` filter terms. Same syntax as `GET /documents/purchase_invoices` — see that operation's description for the available keys. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   version?: number | string | null
> }[]
> ```

***

### purchaseInvoices.notes.create

`documents.purchaseInvoices.notes.create`

Adds note to entity: adds a note to the purchase invoice (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.notes.create({
	purchase_invoice_id: '458026356994737217',
	note: { note: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `purchase_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `note` | `object` | No | — |

> [accordion] note full type
>
> ```ts theme={null}
> {
>   note?: string,
>   todo?: boolean | string,
>   assignee_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `entity_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `entity_type` | `string \| null` | No | — |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo` | `boolean \| string \| null \| null` | No | — |
| `note` | `string \| null \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `completed_by_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo_type` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

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

***

### purchaseInvoices.notes.delete

`documents.purchaseInvoices.notes.delete`

Destroys note from entity (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.notes.delete({ purchase_invoice_id: '458026356994737217', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `purchase_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### purchaseInvoices.payments.create

`documents.purchaseInvoices.payments.create`

Create a payment: registers a payment for a purchase invoice (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.payments.create({
	id: '458026356994737217',
	payment: { payment_date: '2026-04-09', price: '100.00' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `payment` | `object` | No | — |

> [accordion] payment full type
>
> ```ts theme={null}
> {
>   payment_date: string,
>   price: string | number | null,
>   price_base?: string | number | null,
>   financial_account_id?: string | number,
>   financial_mutation_id?: string | number,
>   transaction_identifier?: string,
>   manual_payment_action?: string,
>   ledger_account_id?: string | number,
>   invoice_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `invoice_type` | `string \| null` | No | — |
| `invoice_id` | `string \| number \| null` | No | A unique record identifier |
| `financial_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `payment_transaction_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `transaction_identifier` | `string \| null \| null` | No | — |
| `price` | `string \| number \| null \| null` | No | — |
| `price_base` | `string \| number \| null \| null` | No | — |
| `payment_date` | `string \| null` | No | — |
| `credit_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `financial_mutation_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `linked_payment_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `manual_payment_action` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### purchaseInvoices.payments.delete

`documents.purchaseInvoices.payments.delete`

Delete a payment (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.payments.delete({ id: '458026356994737217', payment_id: '443001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `payment_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### purchaseInvoices.update

`documents.purchaseInvoices.update`

Update purchase invoice (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.purchaseInvoices.update({
	id: '458026356994737217',
	purchase_invoice: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `purchase_invoice` | `object` | No | — |

> [accordion] purchase\_invoice full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number,
>   reference?: string,
>   date?: string,
>   due_date?: string,
>   currency?: string,
>   prices_are_incl_tax?: boolean | string,
>   revenue_invoice?: boolean | string,
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[],
>   fiscal_allocations_attributes?: Record<string, {
>     id?: string | number,
>     ledger_account_id?: string | number,
>     private_ledger_account_id?: string | number,
>     percentage?: string | number | null,
>     _destroy?: boolean | string
>   }> | {
>     id?: string | number,
>     ledger_account_id?: string | number,
>     private_ledger_account_id?: string | number,
>     percentage?: string | number | null,
>     _destroy?: boolean | string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `currency` | `string \| null` | No | ISO 4217 currency code |
| `exchange_rate` | `string \| null \| null` | No | — |
| `revenue_invoice` | `boolean \| null \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `tax_number` | `string \| null \| null` | No | — |
| `total_price_excl_tax` | `string \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `fiscal_allocations` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] fiscal\_allocations full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   private_ledger_account_id?: string | number | null,
>   percentage?: string | number | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### receipts.attachments.create

`documents.receipts.attachments.create`

Add attachment to receipt: add an attachment to a receipt (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.receipts.attachments.create({
	id: '458026356994737217',
	file: { base64: 'JVBERi0xLjQKJSVFT0YK', filename: 'invoice.pdf', contentType: 'application/pdf' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `file` | `string \| object \| custom` | No | A file: a public URL to it, or \{url, filename?, contentType?}, or \{base64, filename?, contentType?} for a small one. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `number`

***

### receipts.attachments.delete

`documents.receipts.attachments.delete`

Delete an attachment (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.receipts.attachments.delete({ id: '458026356994737217', attachment_id: '442001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `attachment_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### receipts.attachments.download

`documents.receipts.attachments.download`

Download attachment: download the attachment (returned as a file) (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.receipts.attachments.download({ id: '458026356994737217', attachment_id: '442001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `attachment_id` | `string \| number` | Yes | A unique record identifier |

**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. |

***

### receipts.create

`documents.receipts.create`

Create a new receipt (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.receipts.create({
	receipt: { reference: 'PO-42' },
	payment: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `receipt` | `object` | No | — |
| `payment` | `object` | No | — |

> [accordion] receipt full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number,
>   reference?: string,
>   date?: string,
>   currency?: string,
>   prices_are_incl_tax?: boolean | string,
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[],
>   fiscal_allocations_attributes?: Record<string, {
>     id?: string | number,
>     ledger_account_id?: string | number,
>     private_ledger_account_id?: string | number,
>     percentage?: string | number | null,
>     _destroy?: boolean | string
>   }> | {
>     id?: string | number,
>     ledger_account_id?: string | number,
>     private_ledger_account_id?: string | number,
>     percentage?: string | number | null,
>     _destroy?: boolean | string
>   }[]
> }
> ```

> [accordion] payment full type
>
> ```ts theme={null}
> {
>   financial_account_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `currency` | `string \| null \| null` | No | — |
| `exchange_rate` | `string \| number \| null \| null` | No | — |
| `revenue_invoice` | `boolean \| null \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `tax_number` | `string \| null \| null` | No | — |
| `total_price_excl_tax` | `string \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `fiscal_allocations` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] fiscal\_allocations full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   private_ledger_account_id?: string | number | null,
>   percentage?: string | number | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### receipts.delete

`documents.receipts.delete`

Delete a receipts (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.receipts.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output:** `number \| object`

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

***

### receipts.fetchByIds

`documents.receipts.fetchByIds`

Fetch receipts with given ids: given a list of document ids, returns the document information belonging to the documents (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.receipts.fetchByIds({
	ids: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ids` | `(number \| string)[]` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   reference?: string | null | null,
>   date?: string | null,
>   due_date?: string | null | null,
>   entry_number?: number | null | null,
>   state?: string | null,
>   currency?: string | null | null,
>   exchange_rate?: string | number | null | null,
>   revenue_invoice?: boolean | null | null,
>   prices_are_incl_tax?: boolean | null | null,
>   origin?: string | null | null,
>   paid_at?: string | null | null,
>   tax_number?: string | null | null,
>   total_price_excl_tax?: string | null | null,
>   total_price_excl_tax_base?: string | null | null,
>   total_price_incl_tax?: string | null | null,
>   total_price_incl_tax_base?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   fiscal_allocations?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     private_ledger_account_id?: string | number | null,
>     percentage?: string | number | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### receipts.get

`documents.receipts.get`

Get a receipt (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.receipts.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `currency` | `string \| null \| null` | No | — |
| `exchange_rate` | `string \| number \| null \| null` | No | — |
| `revenue_invoice` | `boolean \| null \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `tax_number` | `string \| null \| null` | No | — |
| `total_price_excl_tax` | `string \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `fiscal_allocations` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] fiscal\_allocations full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   private_ledger_account_id?: string | number | null,
>   percentage?: string | number | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### receipts.list

`documents.receipts.list`

List receipts, one page at a time (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.receipts.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:open`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| - \| - \| - \| - \| \| period \| `String` \| `this_year` \| Matches on the document date. A named period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom range (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| state \| `String` \| `all` \| `all`, `new`, `saved`, `open`, `paid`, `late` or `pending_payment`. `paid`, `late` and `pending_payment` only apply to documents with a payment lifecycle (purchase invoices and receipts) \| \| recurring \| `String` \| `all` \| `all`, `enabled` or `disabled` \| \| attachment \| `String` \| `all` \| `all`, `with` or `without` \| \| automatic\_saving \| `String` \| `all` \| `all`, `automatic` or `manual`. `automatic` matches documents Moneybird saved by itself after analysing them; `manual` matches everything else, including documents nobody has saved yet \| \| reference \| `String` \| \| Documents with the given reference value \| \| contact\_id \| `Integer` \| \| Documents belonging to the given contact \| \| ledger\_account\_id \| `Integer` \| \| Documents booking against the given ledger account \| \| updated\_after \| `String` \| \| ISO 8601 timestamp in UTC; documents updated strictly after this time \| The `period` filter matches on the document date. It does not look at the `period` of the individual details, which says which months the expenses belong to. Read `details[].period` in the response when you need those months, or use the reports endpoints, which already spread the amounts over that period. A detail's period can fall outside the filtered range, however wide you make it, so this filter cannot tell you which periods amounts fall in. Use the reports endpoints for that. Multiple values for `state`, `recurring` and `attachment` can be combined with a pipe, e.g. `state:open\|paid`. |
| `new_filter` | `string` | No | String terms, example: `key1:value1,key2:value2`. |
| `page` | `number \| string` | No | — |
| `sort` | `date_desc \| date_asc` | No | Sorts the list on date, so the newest (`date_desc`) or the oldest (`date_asc`) items come first. |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   reference?: string | null | null,
>   date?: string | null,
>   due_date?: string | null | null,
>   entry_number?: number | null | null,
>   state?: string | null,
>   currency?: string | null | null,
>   exchange_rate?: string | number | null | null,
>   revenue_invoice?: boolean | null | null,
>   prices_are_incl_tax?: boolean | null | null,
>   origin?: string | null | null,
>   paid_at?: string | null | null,
>   tax_number?: string | null | null,
>   total_price_excl_tax?: string | null | null,
>   total_price_excl_tax_base?: string | null | null,
>   total_price_incl_tax?: string | null | null,
>   total_price_incl_tax_base?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   fiscal_allocations?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     private_ledger_account_id?: string | number | null,
>     percentage?: string | number | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### receipts.listVersions

`documents.receipts.listVersions`

List ids and versions of receipts (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.receipts.listVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Comma-separated `key:value` filter terms. Same syntax as `GET /documents/receipts` — see that operation's description for the available keys. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   version?: number | string | null
> }[]
> ```

***

### receipts.notes.create

`documents.receipts.notes.create`

Adds note to entity: adds a note to the receipt (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.receipts.notes.create({
	receipt_id: '458026356994737217',
	note: { note: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `receipt_id` | `string \| number` | Yes | A unique record identifier |
| `note` | `object` | No | — |

> [accordion] note full type
>
> ```ts theme={null}
> {
>   note?: string,
>   todo?: boolean | string,
>   assignee_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `entity_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `entity_type` | `string \| null` | No | — |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo` | `boolean \| string \| null \| null` | No | — |
| `note` | `string \| null \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `completed_by_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo_type` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

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

***

### receipts.notes.delete

`documents.receipts.notes.delete`

Destroys note from entity (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.receipts.notes.delete({ receipt_id: '458026356994737217', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `receipt_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### receipts.payments.create

`documents.receipts.payments.create`

Create a payment: registers a payment for a receipt (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.receipts.payments.create({
	id: '458026356994737217',
	payment: { payment_date: '2026-04-09', price: '100.00' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `payment` | `object` | No | — |

> [accordion] payment full type
>
> ```ts theme={null}
> {
>   payment_date: string,
>   price: string | number | null,
>   price_base?: string | number | null,
>   financial_account_id?: string | number,
>   financial_mutation_id?: string | number,
>   transaction_identifier?: string,
>   manual_payment_action?: string,
>   ledger_account_id?: string | number,
>   invoice_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `invoice_type` | `string \| null` | No | — |
| `invoice_id` | `string \| number \| null` | No | A unique record identifier |
| `financial_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `payment_transaction_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `transaction_identifier` | `string \| null \| null` | No | — |
| `price` | `string \| number \| null \| null` | No | — |
| `price_base` | `string \| number \| null \| null` | No | — |
| `payment_date` | `string \| null` | No | — |
| `credit_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `financial_mutation_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `linked_payment_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `manual_payment_action` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### receipts.payments.delete

`documents.receipts.payments.delete`

Delete a payment (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.receipts.payments.delete({ id: '458026356994737217', payment_id: '443001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `payment_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### receipts.update

`documents.receipts.update`

Update a receipt (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.receipts.update({
	id: '458026356994737217',
	receipt: { reference: 'PO-42' },
	payment: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `receipt` | `object` | No | — |
| `payment` | `object` | No | — |

> [accordion] receipt full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number,
>   reference?: string,
>   date?: string,
>   currency?: string,
>   prices_are_incl_tax?: boolean | string,
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[],
>   fiscal_allocations_attributes?: Record<string, {
>     id?: string | number,
>     ledger_account_id?: string | number,
>     private_ledger_account_id?: string | number,
>     percentage?: string | number | null,
>     _destroy?: boolean | string
>   }> | {
>     id?: string | number,
>     ledger_account_id?: string | number,
>     private_ledger_account_id?: string | number,
>     percentage?: string | number | null,
>     _destroy?: boolean | string
>   }[]
> }
> ```

> [accordion] payment full type
>
> ```ts theme={null}
> {
>   financial_account_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `currency` | `string \| null \| null` | No | — |
| `exchange_rate` | `string \| number \| null \| null` | No | — |
| `revenue_invoice` | `boolean \| null \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `tax_number` | `string \| null \| null` | No | — |
| `total_price_excl_tax` | `string \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `fiscal_allocations` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] fiscal\_allocations full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   private_ledger_account_id?: string | number | null,
>   percentage?: string | number | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### typelessDocuments.attachments.create

`documents.typelessDocuments.attachments.create`

Add attachment to typeless document: add an attachment to a typeless document (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.typelessDocuments.attachments.create({
	id: '458026356994737217',
	file: { base64: 'JVBERi0xLjQKJSVFT0YK', filename: 'invoice.pdf', contentType: 'application/pdf' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `file` | `string \| object \| custom` | No | A file: a public URL to it, or \{url, filename?, contentType?}, or \{base64, filename?, contentType?} for a small one. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `number`

***

### typelessDocuments.attachments.delete

`documents.typelessDocuments.attachments.delete`

Delete an attachment (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.typelessDocuments.attachments.delete({ id: '458026356994737217', attachment_id: '442001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `attachment_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### typelessDocuments.attachments.download

`documents.typelessDocuments.attachments.download`

Download attachment: download the attachment (returned as a file) (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.typelessDocuments.attachments.download({ id: '458026356994737217', attachment_id: '442001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `attachment_id` | `string \| number` | Yes | A unique record identifier |

**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. |

***

### typelessDocuments.create

`documents.typelessDocuments.create`

Create a new typeless document (scope: documents)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.documents.typelessDocuments.create({
	typeless_document: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `typeless_document` | `object` | No | — |

> [accordion] typeless\_document full type
>
> ```ts theme={null}
> {
>   reference?: string,
>   date?: string,
>   contact_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### typelessDocuments.delete

`documents.typelessDocuments.delete`

Delete a typeless document (scope: documents)

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

```ts theme={null}
await corsair.moneybird.api.documents.typelessDocuments.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output:** `number \| object`

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

***

### typelessDocuments.fetchByIds

`documents.typelessDocuments.fetchByIds`

Fetch typeless documents with given ids: given a list of document ids, returns the document information belonging to the documents (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.typelessDocuments.fetchByIds({
	ids: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ids` | `(number \| string)[]` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   reference?: string | null | null,
>   date?: string | null,
>   state?: string | null,
>   origin?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### typelessDocuments.get

`documents.typelessDocuments.get`

Get a typeless document (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.typelessDocuments.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### typelessDocuments.list

`documents.typelessDocuments.list`

Get typeless documents, one page at a time (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.typelessDocuments.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:open`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| - \| - \| - \| - \| \| period \| `String` \| `this_year` \| A named period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom range (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| state \| `String` \| `all` \| `all`, `new`, `saved`, `open`, `paid`, `late` or `pending_payment`. `paid`, `late` and `pending_payment` only apply to documents with a payment lifecycle (purchase invoices and receipts) \| \| recurring \| `String` \| `all` \| `all`, `enabled` or `disabled` \| \| attachment \| `String` \| `all` \| `all`, `with` or `without` \| \| reference \| `String` \| \| Documents with the given reference value \| \| contact\_id \| `Integer` \| \| Documents belonging to the given contact \| \| ledger\_account\_id \| `Integer` \| \| Documents booking against the given ledger account \| \| updated\_after \| `String` \| \| ISO 8601 timestamp in UTC; documents updated strictly after this time \| Multiple values for `state`, `recurring` and `attachment` can be combined with a pipe, e.g. `state:open\|paid`. |
| `new_filter` | `string` | No | String terms, example: `key1:value1,key2:value2`. |
| `page` | `number \| string` | No | — |
| `sort` | `date_desc \| date_asc` | No | Sorts the list on date, so the newest (`date_desc`) or the oldest (`date_asc`) items come first. |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   reference?: string | null | null,
>   date?: string | null,
>   state?: string | null,
>   origin?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### typelessDocuments.listVersions

`documents.typelessDocuments.listVersions`

List ids and versions of typeless documents (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documents.typelessDocuments.listVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Comma-separated `key:value` filter terms. Same syntax as `GET /documents/typeless_documents` — see that operation's description for the available keys. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   version?: number | string | null
> }[]
> ```

***

## Document Styles

### list

`documentStyles.list`

List all document styles (scopes: any of settings, sales\_invoices or estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.documentStyles.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   identity_id?: string | number | null,
>   default?: boolean | null,
>   logo_hash?: string | null | null,
>   logo_container_full_width?: boolean | null | null,
>   logo_display_width?: number | null | null,
>   logo_position?: string | null,
>   background_hash?: string | null | null,
>   paper_size?: string | null,
>   address_position?: string | null,
>   font_size?: number | null,
>   font_family?: string | null,
>   print_on_stationery?: boolean | null | null,
>   custom_css?: string | null | null,
>   invoice_sender_address?: Record<string, string | boolean>[] | null,
>   invoice_metadata_left?: Record<string, string | boolean>[] | null,
>   invoice_metadata_right?: Record<string, string | boolean>[] | null,
>   estimate_sender_address?: Record<string, string | boolean>[] | null,
>   estimate_metadata_left?: Record<string, string | boolean>[] | null,
>   estimate_metadata_right?: Record<string, string | boolean>[] | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[]
> ```

***

## Downloads

### download

`downloads.download`

Download a file (returned as a file)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.downloads.download({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**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. |

***

### list

`downloads.list`

List all downloads, one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.downloads.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `per_page` | `number \| string` | No | — |
| `page` | `number \| string` | No | — |
| `download_type` | `string` | No | Filter downloads by type. Common download types include: - `auditfile` - `brugstaat` - `export_ledger_account_report` Check the `download_type` field in the response to see all available types. |
| `downloaded` | `boolean \| string` | No | — |
| `failed` | `boolean \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   user_id?: string | number | null | null,
>   download_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   failed?: boolean | null,
>   downloaded?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[]
> ```

***

## Estimates

### attachments.create

`estimates.attachments.create`

Add attachment to estimate: add an attachment to an estimate (scope: estimates)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.estimates.attachments.create({
	id: '458026356994737217',
	file: { base64: 'JVBERi0xLjQKJSVFT0YK', filename: 'invoice.pdf', contentType: 'application/pdf' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `file` | `string \| object \| custom` | No | A file: a public URL to it, or \{url, filename?, contentType?}, or \{base64, filename?, contentType?} for a small one. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `number`

***

### attachments.delete

`estimates.attachments.delete`

Delete an attachment (scope: estimates)

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

```ts theme={null}
await corsair.moneybird.api.estimates.attachments.delete({ estimate_id: '441726012345000001', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `estimate_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### attachments.download

`estimates.attachments.download`

Download attachment: download the attachment (returned as a file) (scope: estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.estimates.attachments.download({ estimate_id: '441726012345000001', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `estimate_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**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. |

***

### bill

`estimates.bill`

Bills an estimate: an invoice is created based on the accepted estimate (scopes: estimates and sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.estimates.bill({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### changeState

`estimates.changeState`

Changes the state of an estimate: not every state change is allowed (scope: estimates)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.estimates.changeState({ id: '458026356994737217', state: 'accepted' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `state` | `string` | Yes | Can be accepted, rejected, open, late, billed or archived. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `estimate_id` | `string \| null \| null` | No | — |
| `estimate_sequence_id` | `string \| null \| null` | No | — |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `estimate_date` | `string \| null \| null` | No | — |
| `due_date` | `string \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `exchange_rate` | `string \| number \| null \| null` | No | — |
| `discount` | `string \| number \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `show_tax` | `boolean \| null` | No | — |
| `sign_online` | `boolean \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `accepted_at` | `string \| null \| null` | No | — |
| `rejected_at` | `string \| null \| null` | No | — |
| `archived_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `pre_text` | `string \| null \| null` | No | — |
| `post_text` | `string \| null \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_discount` | `string \| number \| null \| null` | No | — |
| `url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

***

### create

`estimates.create`

Creates a new estimate (scope: estimates)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.estimates.create({
	estimate: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `estimate` | `object` | No | — |

> [accordion] estimate full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number,
>   contact_person_id?: string | number,
>   document_style_id?: string | number,
>   workflow_id?: string | number,
>   reference?: string,
>   estimate_date?: string,
>   estimate_sequence_id?: string | number,
>   language?: string,
>   currency?: string,
>   prices_are_incl_tax?: boolean | string,
>   show_tax?: boolean | string,
>   first_due_interval?: number | string,
>   pre_text?: string,
>   post_text?: string,
>   discount?: string | number | null,
>   original_sales_invoice_id?: string | number,
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[],
>   custom_fields_attributes?: Record<string, {
>     id: string | number,
>     value: string
>   }> | {
>     id?: string | number,
>     value?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `estimate_id` | `string \| null \| null` | No | — |
| `estimate_sequence_id` | `string \| null \| null` | No | — |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `estimate_date` | `string \| null \| null` | No | — |
| `due_date` | `string \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `exchange_rate` | `string \| number \| null \| null` | No | — |
| `discount` | `string \| number \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `show_tax` | `boolean \| null` | No | — |
| `sign_online` | `boolean \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `accepted_at` | `string \| null \| null` | No | — |
| `rejected_at` | `string \| null \| null` | No | — |
| `archived_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `pre_text` | `string \| null \| null` | No | — |
| `post_text` | `string \| null \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_discount` | `string \| number \| null \| null` | No | — |
| `url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

***

### delete

`estimates.delete`

Deletes an estimate (scope: estimates)

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

```ts theme={null}
await corsair.moneybird.api.estimates.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### downloadPdf

`estimates.downloadPdf`

Download estimate PDF by id: redirects to the download URL of the estimate as PDF (returned as a file) (scope: estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.estimates.downloadPdf({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `media` | `string` | No | In case you want to hide sender address and logo you can set this to 'stationery'. |

**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. |

***

### downloadSignedPdf

`estimates.downloadSignedPdf`

Download signed estimate PDF by id: redirects to the download URL of the estimate PDF that the contact signed online (returned as a file) (scope: estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.estimates.downloadSignedPdf({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**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. |

***

### fetchByIds

`estimates.fetchByIds`

Fetch estimates with given ids: given a list of estimate ids, returns the estimate information belonging to the estimates (scope: estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.estimates.fetchByIds({
	ids: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ids` | `(number \| string)[]` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   estimate_id?: string | null | null,
>   estimate_sequence_id?: string | null | null,
>   workflow_id?: string | number | null,
>   document_style_id?: string | number | null,
>   identity_id?: string | number | null,
>   draft_id?: number | null | null,
>   state?: string | null,
>   estimate_date?: string | null | null,
>   due_date?: string | null,
>   reference?: string | null | null,
>   language?: string | null | null,
>   currency?: string | null,
>   exchange_rate?: string | number | null | null,
>   discount?: string | number | null | null,
>   original_estimate_id?: string | number | null | null,
>   show_tax?: boolean | null,
>   sign_online?: boolean | null,
>   sent_at?: string | null | null,
>   accepted_at?: string | null | null,
>   rejected_at?: string | null | null,
>   archived_at?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   public_view_code?: string | null | null,
>   public_view_code_expires_at?: string | null | null,
>   version?: number | null,
>   pre_text?: string | null | null,
>   post_text?: string | null | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | number | null | null,
>   total_price_excl_tax_base?: string | number | null | null,
>   total_price_incl_tax?: string | number | null | null,
>   total_price_incl_tax_base?: string | number | null | null,
>   total_discount?: string | number | null | null,
>   url?: string | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   tax_totals?: {
>     tax_rate_id?: string | number | null,
>     taxable_amount?: string | number | null | null,
>     taxable_amount_base?: string | number | null | null,
>     tax_amount?: string | number | null | null,
>     tax_amount_base?: string | number | null | null
>   }[] | null
> }[]
> ```

***

### get

`estimates.get`

Get an estimate by id (scope: estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.estimates.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `includes` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `estimate_id` | `string \| null \| null` | No | — |
| `estimate_sequence_id` | `string \| null \| null` | No | — |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `estimate_date` | `string \| null \| null` | No | — |
| `due_date` | `string \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `exchange_rate` | `string \| number \| null \| null` | No | — |
| `discount` | `string \| number \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `show_tax` | `boolean \| null` | No | — |
| `sign_online` | `boolean \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `accepted_at` | `string \| null \| null` | No | — |
| `rejected_at` | `string \| null \| null` | No | — |
| `archived_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `pre_text` | `string \| null \| null` | No | — |
| `post_text` | `string \| null \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_discount` | `string \| number \| null \| null` | No | — |
| `url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

***

### getByEstimateId

`estimates.getByEstimateId`

Get an estimate by estimate\_id (scope: estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.estimates.getByEstimateId({ estimate_id: '441726012345000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `estimate_id` | `string` | Yes | Unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `estimate_id` | `string \| null \| null` | No | — |
| `estimate_sequence_id` | `string \| null \| null` | No | — |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `estimate_date` | `string \| null \| null` | No | — |
| `due_date` | `string \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `exchange_rate` | `string \| number \| null \| null` | No | — |
| `discount` | `string \| number \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `show_tax` | `boolean \| null` | No | — |
| `sign_online` | `boolean \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `accepted_at` | `string \| null \| null` | No | — |
| `rejected_at` | `string \| null \| null` | No | — |
| `archived_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `pre_text` | `string \| null \| null` | No | — |
| `post_text` | `string \| null \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_discount` | `string \| number \| null \| null` | No | — |
| `url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

***

### list

`estimates.list`

List all estimates, one page at a time (scope: estimates)

**Risk:** `read`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:all`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| --- \| --- \| --- \| --- \| \| state \| `String` \| `all` \| `all`, `draft`, `open`, `late`, `accepted`, `rejected`, `billed` or `archived` \| \| period \| `String` \| `this_year` \| Matches on the estimate date. This can either be the description of a period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom period (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| contact\_id \| `Integer` \| \| Filters estimates by a single contact \| \| workflow\_id \| `Integer` \| \| Filters estimates by a single workflow \| The `period` filter matches on the estimate date. It does not look at the `period` of the individual details, which says which months the expenses belong to. Read `details[].period` in the response when you need those months, or use the reports endpoints, which already spread the amounts over that period. A detail's period can fall outside the filtered range, however wide you make it, so this filter cannot tell you which periods amounts fall in. Use the reports endpoints for that. You can filter by multiple states at the same time as well. To do this, separate the state values by a pipe: `state:draft\|scheduled`. |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   estimate_id?: string | null | null,
>   estimate_sequence_id?: string | null | null,
>   workflow_id?: string | number | null,
>   document_style_id?: string | number | null,
>   identity_id?: string | number | null,
>   draft_id?: number | null | null,
>   state?: string | null,
>   estimate_date?: string | null | null,
>   due_date?: string | null,
>   reference?: string | null | null,
>   language?: string | null | null,
>   currency?: string | null,
>   exchange_rate?: string | number | null | null,
>   discount?: string | number | null | null,
>   original_estimate_id?: string | number | null | null,
>   show_tax?: boolean | null,
>   sign_online?: boolean | null,
>   sent_at?: string | null | null,
>   accepted_at?: string | null | null,
>   rejected_at?: string | null | null,
>   archived_at?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   public_view_code?: string | null | null,
>   public_view_code_expires_at?: string | null | null,
>   version?: number | null,
>   pre_text?: string | null | null,
>   post_text?: string | null | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | number | null | null,
>   total_price_excl_tax_base?: string | number | null | null,
>   total_price_incl_tax?: string | number | null | null,
>   total_price_incl_tax_base?: string | number | null | null,
>   total_discount?: string | number | null | null,
>   url?: string | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   tax_totals?: {
>     tax_rate_id?: string | number | null,
>     taxable_amount?: string | number | null | null,
>     taxable_amount_base?: string | number | null | null,
>     tax_amount?: string | number | null | null,
>     tax_amount_base?: string | number | null | null
>   }[] | null
> }[]
> ```

***

### listVersions

`estimates.listVersions`

List all ids and versions (scope: estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.estimates.listVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Comma-separated `key:value` filter terms. Same syntax as `GET /estimates` — see that operation's description for the available keys. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   version?: number | string | null
> }[]
> ```

***

### notes.create

`estimates.notes.create`

Adds note to entity: adds a note to the estimate (scope: estimates)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.estimates.notes.create({
	estimate_id: '441726012345000001',
	note: { note: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `estimate_id` | `string \| number` | Yes | A unique record identifier |
| `note` | `object` | No | — |

> [accordion] note full type
>
> ```ts theme={null}
> {
>   note?: string,
>   todo?: boolean | string,
>   assignee_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `entity_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `entity_type` | `string \| null` | No | — |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo` | `boolean \| string \| null \| null` | No | — |
| `note` | `string \| null \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `completed_by_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo_type` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

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

***

### notes.delete

`estimates.notes.delete`

Destroys note from entity (scope: estimates)

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

```ts theme={null}
await corsair.moneybird.api.estimates.notes.delete({ estimate_id: '441726012345000001', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `estimate_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### send

`estimates.send`

Send an estimate to the contact (sends real email) or schedule it (scope: estimates)

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

```ts theme={null}
await corsair.moneybird.api.estimates.send({
	id: '458026356994737217',
	estimate_sending: { delivery_method: 'Email' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `estimate_sending` | `object` | No | — |
| `sender` | `boolean \| string` | No | — |
| `signature_output` | `string` | No | — |
| `audit_trail` | `string` | No | — |
| `ip_address` | `string` | No | — |

> [accordion] estimate\_sending full type
>
> ```ts theme={null}
> {
>   delivery_method?: Email | Manual,
>   email_address?: string,
>   email_message?: string,
>   sign_online?: boolean | string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `estimate_id` | `string \| null \| null` | No | — |
| `estimate_sequence_id` | `string \| null \| null` | No | — |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `estimate_date` | `string \| null \| null` | No | — |
| `due_date` | `string \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `exchange_rate` | `string \| number \| null \| null` | No | — |
| `discount` | `string \| number \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `show_tax` | `boolean \| null` | No | — |
| `sign_online` | `boolean \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `accepted_at` | `string \| null \| null` | No | — |
| `rejected_at` | `string \| null \| null` | No | — |
| `archived_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `pre_text` | `string \| null \| null` | No | — |
| `post_text` | `string \| null \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_discount` | `string \| number \| null \| null` | No | — |
| `url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

***

### update

`estimates.update`

Updates an estimate: when updating an estimate, provide only the attributes you want to update (scope: estimates)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.estimates.update({
	id: '458026356994737217',
	estimate: { update_contact: true },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `estimate` | `object` | No | — |

> [accordion] estimate full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number,
>   contact_person_id?: string | number,
>   update_contact?: boolean | string,
>   document_style_id?: string | number,
>   workflow_id?: string | number,
>   reference?: string,
>   estimate_date?: string,
>   estimate_sequence_id?: string | number,
>   remove_estimate_sequence_id?: boolean | string,
>   language?: string,
>   currency?: string,
>   prices_are_incl_tax?: boolean | string,
>   show_tax?: boolean | string,
>   first_due_interval?: number,
>   pre_text?: string,
>   post_text?: string,
>   discount?: string | number | null,
>   original_sales_invoice_id?: string | number,
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[],
>   custom_fields_attributes?: Record<string, {
>     id: string | number,
>     value: string
>   }> | {
>     id?: string | number,
>     value?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `estimate_id` | `string \| null \| null` | No | — |
| `estimate_sequence_id` | `string \| null \| null` | No | — |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `estimate_date` | `string \| null \| null` | No | — |
| `due_date` | `string \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `exchange_rate` | `string \| number \| null \| null` | No | — |
| `discount` | `string \| number \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `show_tax` | `boolean \| null` | No | — |
| `sign_online` | `boolean \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `accepted_at` | `string \| null \| null` | No | — |
| `rejected_at` | `string \| null \| null` | No | — |
| `archived_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `pre_text` | `string \| null \| null` | No | — |
| `post_text` | `string \| null \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_excl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax` | `string \| number \| null \| null` | No | — |
| `total_price_incl_tax_base` | `string \| number \| null \| null` | No | — |
| `total_discount` | `string \| number \| null \| null` | No | — |
| `url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

***

## Events

### list

`events.list`

List events; needs entity\_type or entity\_id

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.events.list({ entity_type: 'SalesInvoice' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `per_page` | `number \| string` | No | — |
| `entity_type` | `string` | No | Only return events of this record type, for example `Contact`, `SalesInvoice` or `Document`. The user needs permission for this type. |
| `entity_id` | `string \| number` | No | A unique record identifier |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[]
> ```

***

## External Sales Invoices

### attachments.create

`externalSalesInvoices.attachments.create`

Add attachment to external sales invoice: add an attachment to an external sales invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.attachments.create({
	id: '458026356994737217',
	file: { base64: 'JVBERi0xLjQKJSVFT0YK', filename: 'invoice.pdf', contentType: 'application/pdf' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `file` | `string \| object \| custom` | No | A file: a public URL to it, or \{url, filename?, contentType?}, or \{base64, filename?, contentType?} for a small one. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `number`

***

### attachments.delete

`externalSalesInvoices.attachments.delete`

Delete an attachment (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.attachments.delete({ external_sales_invoice_id: '458026356994737217', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `external_sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### attachments.download

`externalSalesInvoices.attachments.download`

Download attachment: download the attachment (returned as a file) (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.attachments.download({ external_sales_invoice_id: '458026356994737217', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `external_sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**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. |

***

### create

`externalSalesInvoices.create`

Create an external sales invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.create({
	external_sales_invoice: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `external_sales_invoice` | `object` | No | — |

> [accordion] external\_sales\_invoice full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number,
>   reference?: string,
>   date?: string,
>   due_date?: string,
>   currency?: string,
>   prices_are_incl_tax?: boolean | string,
>   source?: string,
>   source_url?: string,
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `date` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `due_date` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `source` | `string \| null \| null` | No | — |
| `source_url` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | ISO 4217 currency code |
| `paid_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

***

### createFromAttachment

`externalSalesInvoices.createFromAttachment`

Create external sales invoice from attachment (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.createFromAttachment({
	file: { base64: 'JVBERi0xLjQKJSVFT0YK', filename: 'invoice.pdf', contentType: 'application/pdf' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `file` | `string \| object \| custom` | No | A file: a public URL to it, or \{url, filename?, contentType?}, or \{base64, filename?, contentType?} for a small one. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `number`

***

### delete

`externalSalesInvoices.delete`

Delete an external sales invoice (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### fetchByIds

`externalSalesInvoices.fetchByIds`

Fetch external sales invoices with given ids: given a list of external sales invoice ids, returns the external sales invoice information belonging to the external sales invoice (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.fetchByIds({
	ids: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ids` | `(number \| string)[]` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   date?: string | null,
>   state?: string | null,
>   due_date?: string | null | null,
>   reference?: string | null | null,
>   entry_number?: number | null,
>   origin?: string | null | null,
>   source?: string | null | null,
>   source_url?: string | null | null,
>   currency?: string | null,
>   paid_at?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   total_paid?: string | null,
>   total_unpaid?: string | null,
>   total_unpaid_base?: string | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | null,
>   total_price_excl_tax_base?: string | null,
>   total_price_incl_tax?: string | null,
>   total_price_incl_tax_base?: string | null,
>   marked_dubious_on?: string | null | null,
>   marked_uncollectible_on?: string | null | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   tax_totals?: {
>     tax_rate_id?: string | number | null,
>     taxable_amount?: string | number | null | null,
>     taxable_amount_base?: string | number | null | null,
>     tax_amount?: string | number | null | null,
>     tax_amount_base?: string | number | null | null
>   }[] | null
> }[]
> ```

***

### get

`externalSalesInvoices.get`

Get an external sales invoice by id (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `date` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `due_date` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `source` | `string \| null \| null` | No | — |
| `source_url` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | ISO 4217 currency code |
| `paid_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

***

### list

`externalSalesInvoices.list`

List all external invoices, one page at a time (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:all`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| --- \| --- \| --- \| --- \| \| state \| `String` \| `all` \| `all`, `new`, `open`, `late`, `paid`, or `uncollectible` \| \| period \| `String` \| `this_year` \| Matches on the invoice date. This can either be the description of a period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom period (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| contact\_id \| `Integer` \| \| Select invoices belonging to a certain contact \| The `period` filter matches on the invoice date. It does not look at the `period` of the individual details, which says which months the expenses belong to. Read `details[].period` in the response when you need those months, or use the reports endpoints, which already spread the amounts over that period. A detail's period can fall outside the filtered range, however wide you make it, so this filter cannot tell you which periods amounts fall in. Use the reports endpoints for that. You can filter by multiple states at the same time as well. To do this, separate the state values by a pipe: `state:new\|open`. |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   date?: string | null,
>   state?: string | null,
>   due_date?: string | null | null,
>   reference?: string | null | null,
>   entry_number?: number | null,
>   origin?: string | null | null,
>   source?: string | null | null,
>   source_url?: string | null | null,
>   currency?: string | null,
>   paid_at?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   total_paid?: string | null,
>   total_unpaid?: string | null,
>   total_unpaid_base?: string | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | null,
>   total_price_excl_tax_base?: string | null,
>   total_price_incl_tax?: string | null,
>   total_price_incl_tax_base?: string | null,
>   marked_dubious_on?: string | null | null,
>   marked_uncollectible_on?: string | null | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   tax_totals?: {
>     tax_rate_id?: string | number | null,
>     taxable_amount?: string | number | null | null,
>     taxable_amount_base?: string | number | null | null,
>     tax_amount?: string | number | null | null,
>     tax_amount_base?: string | number | null | null
>   }[] | null
> }[]
> ```

***

### listVersions

`externalSalesInvoices.listVersions`

List all ids and versions (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.listVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:all`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| --- \| --- \| --- \| --- \| \| state \| `String` \| `all` \| `all`, `new`, `open`, `late`, `paid`, or `uncollectible` \| \| period \| `String` \| `this_year` \| This can either be the description of a period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom period (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| contact\_id \| `Integer` \| \| Select invoices belonging to a certain contact \| You can filter by multiple states at the same time as well. To do this, separate the state values by a pipe: `state:new\|open`. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   version?: number | string | null
> }[]
> ```

***

### markAsDubious

`externalSalesInvoices.markAsDubious`

Mark as dubious: this endpoint marks an external sales invoice as dubious (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.markAsDubious({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `dubious_date` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `date` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `due_date` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `source` | `string \| null \| null` | No | — |
| `source_url` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | ISO 4217 currency code |
| `paid_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

***

### markAsUncollectible

`externalSalesInvoices.markAsUncollectible`

Mark as uncollectible: this endpoint marks an external sales invoice as uncollectible (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.markAsUncollectible({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `uncollectible_date` | `string` | No | — |
| `book_method` | `string` | No | Can be `revenue`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `date` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `due_date` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `source` | `string \| null \| null` | No | — |
| `source_url` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | ISO 4217 currency code |
| `paid_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

***

### notes.create

`externalSalesInvoices.notes.create`

Adds note to entity: adds a note to the external sales invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.notes.create({
	external_sales_invoice_id: '458026356994737217',
	note: { note: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `external_sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `note` | `object` | No | — |

> [accordion] note full type
>
> ```ts theme={null}
> {
>   note?: string,
>   todo?: boolean | string,
>   assignee_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `entity_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `entity_type` | `string \| null` | No | — |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo` | `boolean \| string \| null \| null` | No | — |
| `note` | `string \| null \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `completed_by_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo_type` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

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

***

### notes.delete

`externalSalesInvoices.notes.delete`

Destroys note from entity (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.notes.delete({ external_sales_invoice_id: '458026356994737217', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `external_sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### payments.create

`externalSalesInvoices.payments.create`

Create a payment: registers a payment for an external sales invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.payments.create({
	external_sales_invoice_id: '458026356994737217',
	payment: { payment_date: '2026-04-09', price: '100.00' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `external_sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `payment` | `object` | No | — |

> [accordion] payment full type
>
> ```ts theme={null}
> {
>   payment_date: string,
>   price: string | number | null,
>   price_base?: string | number | null,
>   financial_account_id?: string | number,
>   financial_mutation_id?: string | number,
>   transaction_identifier?: string,
>   manual_payment_action?: string,
>   ledger_account_id?: string | number,
>   invoice_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `invoice_type` | `string \| null` | No | — |
| `invoice_id` | `string \| number \| null` | No | A unique record identifier |
| `financial_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `payment_transaction_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `transaction_identifier` | `string \| null \| null` | No | — |
| `price` | `string \| number \| null \| null` | No | — |
| `price_base` | `string \| number \| null \| null` | No | — |
| `payment_date` | `string \| null` | No | — |
| `credit_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `financial_mutation_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `linked_payment_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `manual_payment_action` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### payments.delete

`externalSalesInvoices.payments.delete`

Delete a payment (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.payments.delete({ external_sales_invoice_id: '458026356994737217', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `external_sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### update

`externalSalesInvoices.update`

Update an external sales invoice: when updating an external sales invoice, provide only the attributes you want to update (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.externalSalesInvoices.update({
	id: '458026356994737217',
	external_sales_invoice: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `external_sales_invoice` | `object` | No | — |

> [accordion] external\_sales\_invoice full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number,
>   reference?: string,
>   date?: string,
>   due_date?: string,
>   currency?: string,
>   prices_are_incl_tax?: boolean | string,
>   source?: string,
>   source_url?: string,
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `date` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `due_date` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `entry_number` | `number \| null` | No | — |
| `origin` | `string \| null \| null` | No | — |
| `source` | `string \| null \| null` | No | — |
| `source_url` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | ISO 4217 currency code |
| `paid_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

***

## Financial Accounts

### list

`financialAccounts.list`

Retrieve all available financial accounts for the administration: retrieve the financial accounts for the administration (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.financialAccounts.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   type?: string | null,
>   name?: string | null,
>   identifier?: string | null,
>   currency?: string | null,
>   provider?: string | null | null,
>   moneybird_account?: boolean | null,
>   active?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[]
> ```

***

## Financial Mutations

### fetchByIds

`financialMutations.fetchByIds`

Fetch financial mutations with given ids: given a list of financial mutation ids, returns the financial mutation information belonging to the financial mutation (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.financialMutations.fetchByIds({
	ids: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ids` | `(number \| string)[]` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   amount?: string | null,
>   code?: string | null | null,
>   date?: string | null,
>   message?: string | null | null,
>   contra_account_name?: string | null | null,
>   contra_account_number?: string | null,
>   state?: string | null,
>   settlement_state?: string | null,
>   amount_open?: string | null,
>   sepa_fields?: {
>   } | null | null,
>   batch_reference?: string | null | null,
>   financial_account_id?: string | number | null,
>   currency?: string | null,
>   original_amount?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   financial_statement_id?: string | number | null,
>   processed_at?: string | null | null,
>   account_servicer_transaction_id?: string | null | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   ledger_account_bookings?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     financial_mutation_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     description?: string | null | null,
>     price?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### get

`financialMutations.get`

Get a financial mutation by id (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.financialMutations.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `amount` | `string \| null` | No | — |
| `code` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `message` | `string \| null \| null` | No | — |
| `contra_account_name` | `string \| null \| null` | No | — |
| `contra_account_number` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `settlement_state` | `string \| null` | No | — |
| `amount_open` | `string \| null` | No | — |
| `sepa_fields` | `object \| null` | No | — |
| `batch_reference` | `string \| null \| null` | No | — |
| `financial_account_id` | `string \| number \| null` | No | A unique record identifier |
| `currency` | `string \| null` | No | ISO 4217 currency code |
| `original_amount` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `financial_statement_id` | `string \| number \| null` | No | A unique record identifier |
| `processed_at` | `string \| null \| null` | No | — |
| `account_servicer_transaction_id` | `string \| null \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `ledger_account_bookings` | `object[] \| null` | No | — |

> [accordion] sepa\_fields full type
>
> ```ts theme={null}
> {
> } | null | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] ledger\_account\_bookings full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   financial_mutation_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   description?: string | null | null,
>   price?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### linkBooking

`financialMutations.linkBooking`

Links a financial mutation to a booking: linking a booking to a financial mutation allows you to process financial mutations (scope: bank)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.financialMutations.linkBooking({ id: '458026356994737217', booking_type: 'Payment' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `booking_type` | `SalesInvoice \| Document \| LedgerAccount \| PaymentTransactionBatch \| PurchaseTransaction \| NewPurchaseInvoice \| NewReceipt \| PaymentTransaction \| PurchaseTransactionBatch \| ExternalSalesInvoice \| Payment \| VatDocument` | Yes | The type of record to link the mutation to. |
| `booking_id` | `string \| number` | No | A unique record identifier |
| `price_base` | `string \| number \| null` | No | An amount of money. Both a decimal and a string '10,95' are accepted. A string is bound to the same range as a number, -1,000,000,000 \<= *n* \<= 1,000,000,000. |
| `price` | `string \| number \| null` | No | An amount of money. Both a decimal and a string '10,95' are accepted. A string is bound to the same range as a number, -1,000,000,000 \<= *n* \<= 1,000,000,000. |
| `description` | `string` | No | — |
| `payment_batch_identifier` | `string` | No | — |
| `project_id` | `string \| number` | No | A unique record identifier |
| `mark_open_sepa_transaction_as_paid` | `boolean \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `amount` | `string \| null` | No | — |
| `code` | `string \| null \| null` | No | — |
| `date` | `string \| null` | No | — |
| `message` | `string \| null \| null` | No | — |
| `contra_account_name` | `string \| null \| null` | No | — |
| `contra_account_number` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `settlement_state` | `string \| null` | No | — |
| `amount_open` | `string \| null` | No | — |
| `sepa_fields` | `object \| null` | No | — |
| `batch_reference` | `string \| null \| null` | No | — |
| `financial_account_id` | `string \| number \| null` | No | A unique record identifier |
| `currency` | `string \| null` | No | ISO 4217 currency code |
| `original_amount` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `version` | `number \| null` | No | — |
| `financial_statement_id` | `string \| number \| null` | No | A unique record identifier |
| `processed_at` | `string \| null \| null` | No | — |
| `account_servicer_transaction_id` | `string \| null \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `ledger_account_bookings` | `object[] \| null` | No | — |

> [accordion] sepa\_fields full type
>
> ```ts theme={null}
> {
> } | null | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] ledger\_account\_bookings full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   financial_mutation_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   description?: string | null | null,
>   price?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### list

`financialMutations.list`

List all financial mutations (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.financialMutations.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:unprocessed`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| - \| - \| - \| - \| \| period \| `String` \| `this_year` \| A named period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom range (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| state \| `String` \| `all` \| `all`, `unprocessed`, `processed` or `auto_booked` \| \| mutation\_type \| `String` \| `all` \| `all`, `debit` or `credit` \| \| financial\_account\_id \| `Integer` \| \| Restrict to a single financial account \| \| amount\_from \| `String` \| \| Lower bound on the absolute mutation amount (negative input is treated as positive) \| \| amount\_to \| `String` \| \| Upper bound on the absolute mutation amount \| Multiple values for `state` and `mutation_type` can be combined with a pipe, e.g. `state:unprocessed\|processed`. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   amount?: string | null,
>   code?: string | null | null,
>   date?: string | null,
>   message?: string | null | null,
>   contra_account_name?: string | null | null,
>   contra_account_number?: string | null,
>   state?: string | null,
>   settlement_state?: string | null,
>   amount_open?: string | null,
>   sepa_fields?: {
>   } | null | null,
>   batch_reference?: string | null | null,
>   financial_account_id?: string | number | null,
>   currency?: string | null,
>   original_amount?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   financial_statement_id?: string | number | null,
>   processed_at?: string | null | null,
>   account_servicer_transaction_id?: string | null | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   ledger_account_bookings?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     financial_mutation_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     description?: string | null | null,
>     price?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### listVersions

`financialMutations.listVersions`

List all ids and versions (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.financialMutations.listVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:all`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| - \| - \| - \| - \| \| period \| `String` \| `this_year` \| This can either be the description of a period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom period (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| state \| `String` \| \| Can be `all`, `unprocessed` or `processed`\| \| mutation\_type \| `String` \| \| Can be `all`, `debit` or `credit` \| \| financial\_account\_id \| `String` \| \| |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   version?: number | string | null
> }[]
> ```

***

### unlinkBooking

`financialMutations.unlinkBooking`

Unlinks a booking from a financial mutation (scope: bank)

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

```ts theme={null}
await corsair.moneybird.api.financialMutations.unlinkBooking({ id: '458026356994737217', booking_type: 'Payment', booking_id: '446001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `booking_type` | `Payment \| LedgerAccountBooking` | Yes | Can be `Payment` or `LedgerAccountBooking`. |
| `booking_id` | `string \| number` | Yes | A unique record identifier |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   amount?: string | null,
>   code?: string | null | null,
>   date?: string | null,
>   message?: string | null | null,
>   contra_account_name?: string | null | null,
>   contra_account_number?: string | null,
>   state?: string | null,
>   settlement_state?: string | null,
>   amount_open?: string | null,
>   sepa_fields?: {
>   } | null | null,
>   batch_reference?: string | null | null,
>   financial_account_id?: string | number | null,
>   currency?: string | null,
>   original_amount?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   financial_statement_id?: string | number | null,
>   processed_at?: string | null | null,
>   account_servicer_transaction_id?: string | null | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   ledger_account_bookings?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     financial_mutation_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     description?: string | null | null,
>     price?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

## Financial Statements

### create

`financialStatements.create`

Create a new financial statement (scope: bank)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.financialStatements.create({
	financial_statement: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `financial_statement` | `object` | No | — |

> [accordion] financial\_statement full type
>
> ```ts theme={null}
> {
>   financial_account_id?: string | number,
>   reference: string,
>   official_date?: string,
>   official_balance?: string | number | null,
>   importer_key?: string,
>   financial_mutations_attributes?: {
>     date?: string,
>     valutation_date?: string,
>     message?: string,
>     amount?: string | number | null,
>     code?: string,
>     contra_account_name?: string,
>     contra_account_number?: string,
>     batch_reference?: string,
>     offset?: number,
>     account_servicer_transaction_id?: string,
>     account_servicer_metadata?: {
>     },
>     adyen_payment_instrument_id?: string | number,
>     _destroy?: boolean | string,
>     smart_transfer?: boolean | string
>   }[] | Record<string, {
>     date?: string,
>     valutation_date?: string,
>     message?: string,
>     amount?: string | number | null,
>     code?: string,
>     contra_account_name?: string,
>     contra_account_number?: string,
>     batch_reference?: string,
>     offset?: number,
>     account_servicer_transaction_id?: string,
>     account_servicer_metadata?: {
>     },
>     adyen_payment_instrument_id?: string | number,
>     _destroy?: boolean | string,
>     smart_transfer?: boolean | string
>   }>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `financial_account_id` | `string \| number \| null` | No | A unique record identifier |
| `reference` | `string \| null` | No | — |
| `official_date` | `string \| null \| null` | No | — |
| `official_balance` | `string \| null \| null` | No | — |
| `importer_service` | `string \| null \| null` | No | — |
| `financial_mutations` | `object[] \| null` | No | — |

> [accordion] financial\_mutations full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   amount?: string | null,
>   code?: string | null | null,
>   date?: string | null,
>   message?: string | null | null,
>   contra_account_name?: string | null | null,
>   contra_account_number?: string | null,
>   state?: string | null,
>   settlement_state?: string | null,
>   amount_open?: string | null,
>   sepa_fields?: {
>   } | null | null,
>   batch_reference?: string | null | null,
>   financial_account_id?: string | number | null,
>   currency?: string | null,
>   original_amount?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   financial_statement_id?: string | number | null,
>   processed_at?: string | null | null,
>   account_servicer_transaction_id?: string | null | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   ledger_account_bookings?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     financial_mutation_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     description?: string | null | null,
>     price?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[] | null
> ```

***

### delete

`financialStatements.delete`

Delete a financial statement (scope: bank)

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

```ts theme={null}
await corsair.moneybird.api.financialStatements.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### update

`financialStatements.update`

Update a financial statement: when updating a financial statement, you only need to provide the information you want to change (scope: bank)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.financialStatements.update({
	id: '458026356994737217',
	financial_statement: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `financial_statement` | `object` | No | — |

> [accordion] financial\_statement full type
>
> ```ts theme={null}
> {
>   reference?: string,
>   official_date?: string,
>   official_balance?: string | number | null,
>   financial_mutations_attributes?: {
>     id?: number,
>     date?: string,
>     message?: string,
>     amount?: string | number | null,
>     code?: string,
>     contra_account_name?: string,
>     contra_account_number?: string,
>     batch_reference?: string,
>     offset?: number,
>     account_servicer_transaction_id?: string,
>     adyen_payment_instrument_id?: string | number,
>     _destroy?: boolean | string
>   }[] | Record<string, {
>     id?: number,
>     date?: string,
>     message?: string,
>     amount?: string | number | null,
>     code?: string,
>     contra_account_name?: string,
>     contra_account_number?: string,
>     batch_reference?: string,
>     offset?: number,
>     account_servicer_transaction_id?: string,
>     adyen_payment_instrument_id?: string | number,
>     _destroy?: boolean | string
>   }>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `financial_account_id` | `string \| number \| null` | No | A unique record identifier |
| `reference` | `string \| null` | No | — |
| `official_date` | `string \| null \| null` | No | — |
| `official_balance` | `string \| null \| null` | No | — |
| `importer_service` | `string \| null \| null` | No | — |
| `financial_mutations` | `object[] \| null` | No | — |

> [accordion] financial\_mutations full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   amount?: string | null,
>   code?: string | null | null,
>   date?: string | null,
>   message?: string | null | null,
>   contra_account_name?: string | null | null,
>   contra_account_number?: string | null,
>   state?: string | null,
>   settlement_state?: string | null,
>   amount_open?: string | null,
>   sepa_fields?: {
>   } | null | null,
>   batch_reference?: string | null | null,
>   financial_account_id?: string | number | null,
>   currency?: string | null,
>   original_amount?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   version?: number | null,
>   financial_statement_id?: string | number | null,
>   processed_at?: string | null | null,
>   account_servicer_transaction_id?: string | null | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   ledger_account_bookings?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     financial_mutation_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     description?: string | null | null,
>     price?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[] | null
> ```

***

## Identities

### create

`identities.create`

Creates an identity: most fields for an identity are required (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.identities.create({
	identity: {
		company_name: 'example',
		country: 'example',
		city: 'example',
		zipcode: 'example',
		address1: 'example',
		email: 'billing@example.com',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `identity` | `object` | No | — |

> [accordion] identity full type
>
> ```ts theme={null}
> {
>   company_name: string,
>   country: string,
>   city: string,
>   zipcode: string,
>   address1: string,
>   address2?: string,
>   email: string,
>   phone?: string,
>   bank_account_name?: string,
>   bank_account_number?: string,
>   bank_account_bic?: string,
>   custom_fields_attributes?: Record<string, {
>     id: string | number,
>     value: string
>   }> | {
>     id?: string | number,
>     value?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `company_name` | `string \| null \| null` | No | — |
| `city` | `string \| null \| null` | No | — |
| `country` | `string \| null \| null` | No | — |
| `zipcode` | `string \| null \| null` | No | — |
| `address1` | `string \| null \| null` | No | — |
| `address2` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `bank_account_name` | `string \| null \| null` | No | — |
| `bank_account_number` | `string \| null \| null` | No | — |
| `bank_account_bic` | `string \| null \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `chamber_of_commerce` | `string \| null \| null` | No | — |
| `tax_number` | `string \| null \| null` | No | — |

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

***

### delete

`identities.delete`

Deletes an identity (scope: settings)

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

```ts theme={null}
await corsair.moneybird.api.identities.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### get

`identities.get`

Retrieve identity by given id (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.identities.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `company_name` | `string \| null \| null` | No | — |
| `city` | `string \| null \| null` | No | — |
| `country` | `string \| null \| null` | No | — |
| `zipcode` | `string \| null \| null` | No | — |
| `address1` | `string \| null \| null` | No | — |
| `address2` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `bank_account_name` | `string \| null \| null` | No | — |
| `bank_account_number` | `string \| null \| null` | No | — |
| `bank_account_bic` | `string \| null \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `chamber_of_commerce` | `string \| null \| null` | No | — |
| `tax_number` | `string \| null \| null` | No | — |

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

***

### getDefault

`identities.getDefault`

Retrieve the default identity (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.identities.getDefault({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `company_name` | `string \| null \| null` | No | — |
| `city` | `string \| null \| null` | No | — |
| `country` | `string \| null \| null` | No | — |
| `zipcode` | `string \| null \| null` | No | — |
| `address1` | `string \| null \| null` | No | — |
| `address2` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `bank_account_name` | `string \| null \| null` | No | — |
| `bank_account_number` | `string \| null \| null` | No | — |
| `bank_account_bic` | `string \| null \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `chamber_of_commerce` | `string \| null \| null` | No | — |
| `tax_number` | `string \| null \| null` | No | — |

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

***

### list

`identities.list`

Retrieve identities: an administration can have multiple identities, for example to cover multiple tradenames or offices (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.identities.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   city?: string | null | null,
>   country?: string | null | null,
>   zipcode?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   email?: string | null | null,
>   phone?: string | null | null,
>   bank_account_name?: string | null | null,
>   bank_account_number?: string | null | null,
>   bank_account_bic?: string | null | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   updated_at?: string | null,
>   created_at?: string | null,
>   chamber_of_commerce?: string | null | null,
>   tax_number?: string | null | null
> }[]
> ```

***

### update

`identities.update`

Updates an identity (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.identities.update({
	id: '458026356994737217',
	identity: { company_name: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `identity` | `object` | No | — |

> [accordion] identity full type
>
> ```ts theme={null}
> {
>   company_name?: string,
>   country?: string,
>   city?: string,
>   zipcode?: string,
>   address1?: string,
>   address2?: string,
>   email?: string,
>   phone?: string,
>   bank_account_name?: string,
>   bank_account_number?: string,
>   bank_account_bic?: string,
>   custom_fields_attributes?: Record<string, {
>     id: string | number,
>     value: string
>   }> | {
>     id?: string | number,
>     value?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `company_name` | `string \| null \| null` | No | — |
| `city` | `string \| null \| null` | No | — |
| `country` | `string \| null \| null` | No | — |
| `zipcode` | `string \| null \| null` | No | — |
| `address1` | `string \| null \| null` | No | — |
| `address2` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `bank_account_name` | `string \| null \| null` | No | — |
| `bank_account_number` | `string \| null \| null` | No | — |
| `bank_account_bic` | `string \| null \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `chamber_of_commerce` | `string \| null \| null` | No | — |
| `tax_number` | `string \| null \| null` | No | — |

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

***

### updateDefault

`identities.updateDefault`

Updates the default identity (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.identities.updateDefault({
	identity: { company_name: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `identity` | `object` | No | — |

> [accordion] identity full type
>
> ```ts theme={null}
> {
>   company_name?: string,
>   legal_entity_type?: eenmanszaak | maatschap | vof | bv | cv | nv | stichting | vereniging | coöperatie | geen_kvk_inschrijving,
>   country?: string,
>   city?: string,
>   zipcode?: string,
>   address1?: string,
>   address2?: string,
>   email?: string,
>   phone?: string,
>   bank_account_name?: string,
>   bank_account_number?: string,
>   bank_account_bic?: string,
>   chamber_of_commerce?: string,
>   tax_number?: string,
>   tax_number_absence_reason?: string,
>   custom_fields_attributes?: Record<string, {
>     id: string | number,
>     value: string
>   }> | {
>     id?: string | number,
>     value?: string
>   }[],
>   administration_attributes?: {
>     legal_entity_type?: eenmanszaak | maatschap | vof | bv | cv | nv | stichting | vereniging | coöperatie | geen_kvk_inschrijving
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `company_name` | `string \| null \| null` | No | — |
| `city` | `string \| null \| null` | No | — |
| `country` | `string \| null \| null` | No | — |
| `zipcode` | `string \| null \| null` | No | — |
| `address1` | `string \| null \| null` | No | — |
| `address2` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `phone` | `string \| null \| null` | No | — |
| `bank_account_name` | `string \| null \| null` | No | — |
| `bank_account_number` | `string \| null \| null` | No | — |
| `bank_account_bic` | `string \| null \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `chamber_of_commerce` | `string \| null \| null` | No | — |
| `tax_number` | `string \| null \| null` | No | — |

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

***

## Ledger Accounts

### create

`ledgerAccounts.create`

Creates a new ledger account (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.ledgerAccounts.create({
	rgs_code: 'WOmzNodOmz',
	ledger_account: { name: 'Website Relaunch', account_type: 'non_current_assets' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ledger_account` | `object` | No | — |
| `rgs_code` | `string` | Yes | Existing RGS version 3.5 code, e.g. 'WMfoBelMfo' |

> [accordion] ledger\_account full type
>
> ```ts theme={null}
> {
>   name: string,
>   account_type: non_current_assets | current_assets | equity | provisions | non_current_liabilities | current_liabilities | revenue | direct_costs | expenses | other_income_expenses,
>   account_id?: string | number,
>   parent_id?: string | number,
>   allowed_document_types?: (sales_invoice | purchase_invoice | general_journal_document | financial_mutation | payment)[],
>   description?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `account_type` | `string \| null` | No | — |
| `account_id` | `string \| null \| null` | No | — |
| `parent_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `active` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `allowed_document_types` | `string[] \| null` | No | — |
| `taxonomy_item` | `object \| null` | No | — |
| `financial_account_id` | `string \| number \| null \| null` | No | A unique record identifier |

> [accordion] taxonomy\_item full type
>
> ```ts theme={null}
> {
>   taxonomy_version?: string | null,
>   code?: string | null,
>   name?: string | null,
>   name_english?: string | null | null,
>   reference?: string | null | null
> } | null | null
> ```

***

### delete

`ledgerAccounts.delete`

Deletes a ledger account (scope: settings)

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

```ts theme={null}
await corsair.moneybird.api.ledgerAccounts.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### get

`ledgerAccounts.get`

Returns information about a ledger account (scopes: any of settings, sales\_invoices, documents or estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.ledgerAccounts.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `account_type` | `string \| null` | No | — |
| `account_id` | `string \| null \| null` | No | — |
| `parent_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `active` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `allowed_document_types` | `string[] \| null` | No | — |
| `taxonomy_item` | `object \| null` | No | — |
| `financial_account_id` | `string \| number \| null \| null` | No | A unique record identifier |

> [accordion] taxonomy\_item full type
>
> ```ts theme={null}
> {
>   taxonomy_version?: string | null,
>   code?: string | null,
>   name?: string | null,
>   name_english?: string | null | null,
>   reference?: string | null | null
> } | null | null
> ```

***

### list

`ledgerAccounts.list`

List all ledger accounts of an administration (scopes: any of settings, sales\_invoices, documents or estimates)

**Risk:** `read`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   account_type?: string | null,
>   account_id?: string | null | null,
>   parent_id?: string | number | null | null,
>   active?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   allowed_document_types?: string[] | null,
>   taxonomy_item?: {
>     taxonomy_version?: string | null,
>     code?: string | null,
>     name?: string | null,
>     name_english?: string | null | null,
>     reference?: string | null | null
>   } | null | null,
>   financial_account_id?: string | number | null | null
> }[]
> ```

***

### update

`ledgerAccounts.update`

Updates a ledger account (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.ledgerAccounts.update({
	id: '458026356994737217',
	ledger_account: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `ledger_account` | `object` | No | — |
| `rgs_code` | `string` | No | Existing RGS version 3.5 code, e.g. 'WMfoBelMfo' |

> [accordion] ledger\_account full type
>
> ```ts theme={null}
> {
>   name?: string,
>   account_id?: string | number,
>   account_type?: non_current_assets | current_assets | equity | provisions | non_current_liabilities | current_liabilities | revenue | direct_costs | expenses | other_income_expenses,
>   parent_id?: string | number,
>   allowed_document_types?: (sales_invoice | purchase_invoice | general_journal_document | financial_mutation | payment)[],
>   description?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `account_type` | `string \| null` | No | — |
| `account_id` | `string \| null \| null` | No | — |
| `parent_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `active` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `allowed_document_types` | `string[] \| null` | No | — |
| `taxonomy_item` | `object \| null` | No | — |
| `financial_account_id` | `string \| number \| null \| null` | No | A unique record identifier |

> [accordion] taxonomy\_item full type
>
> ```ts theme={null}
> {
>   taxonomy_version?: string | null,
>   code?: string | null,
>   name?: string | null,
>   name_english?: string | null | null,
>   reference?: string | null | null
> } | null | null
> ```

***

## Payments

### get

`payments.get`

Returns information about a payment

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.payments.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `invoice_type` | `string \| null` | No | — |
| `invoice_id` | `string \| number \| null` | No | A unique record identifier |
| `financial_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `payment_transaction_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `transaction_identifier` | `string \| null \| null` | No | — |
| `price` | `string \| number \| null \| null` | No | — |
| `price_base` | `string \| number \| null \| null` | No | — |
| `payment_date` | `string \| null` | No | — |
| `credit_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `financial_mutation_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `linked_payment_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `manual_payment_action` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

## Products

### create

`products.create`

Creates a new product (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.products.create({
	product: { description: 'Consulting hour', price: '120.00', ledger_account_id: '447001234567000001' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `product` | `object` | No | — |

> [accordion] product full type
>
> ```ts theme={null}
> {
>   title?: string,
>   description?: string,
>   checkout_description?: string,
>   price: string | number | null,
>   document_style_id?: string | number,
>   ledger_account_id: string | number,
>   tax_rate_id?: string | number,
>   workflow_id?: string | number,
>   currency?: string,
>   checkout_type?: string,
>   frequency_type?: string,
>   frequency?: number,
>   product_type?: string,
>   vat_rate_type?: string,
>   max_amount_per_order?: number,
>   identifier?: string,
>   frequency_preset?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `description` | `string \| null \| null` | No | — |
| `title` | `string \| null \| null` | No | — |
| `identifier` | `string \| null \| null` | No | — |
| `price` | `string \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `frequency` | `number \| null \| null` | No | — |
| `frequency_type` | `string \| null \| null` | No | — |
| `tax_rate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null` | No | A unique record identifier |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### createSalesLink

`products.createSalesLink`

Create online sales link: this call generates an online sales link, and allows pre-setting the contact for a checkout page (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.products.createSalesLink({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `contact_id` | `string \| number` | No | A unique record identifier |

**Output:** `string`

***

### delete

`products.delete`

Deletes a product (scope: settings)

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

```ts theme={null}
await corsair.moneybird.api.products.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### get

`products.get`

Returns information about a product (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.products.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `description` | `string \| null \| null` | No | — |
| `title` | `string \| null \| null` | No | — |
| `identifier` | `string \| null \| null` | No | — |
| `price` | `string \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `frequency` | `number \| null \| null` | No | — |
| `frequency_type` | `string \| null \| null` | No | — |
| `tax_rate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null` | No | A unique record identifier |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### getByIdentifier

`products.getByIdentifier`

Returns information about a product based on the identifier: finds the product by the identifier field of the product (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.products.getByIdentifier({ identifier: 'SKU-001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `identifier` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `description` | `string \| null \| null` | No | — |
| `title` | `string \| null \| null` | No | — |
| `identifier` | `string \| null \| null` | No | — |
| `price` | `string \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `frequency` | `number \| null \| null` | No | — |
| `frequency_type` | `string \| null \| null` | No | — |
| `tax_rate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null` | No | A unique record identifier |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### list

`products.list`

List all products of an administration, one page at a time (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.products.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `query` | `string` | No | Free-text search across the product description, title and identifier. |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |
| `currency` | `string` | No | ISO three-character currency code, e.g. EUR or USD. |
| `active` | `boolean \| string` | No | When true, only active products are returned. Set to false to include deactivated products. |
| `for_checkout` | `boolean \| string` | No | When true, returns only products with online checkout enabled. When false, returns only products without checkout. Omit to include both. |
| `ledger_account_id` | `string \| number` | No | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   description?: string | null | null,
>   title?: string | null | null,
>   identifier?: string | null | null,
>   price?: string | null,
>   currency?: string | null,
>   frequency?: number | null | null,
>   frequency_type?: string | null | null,
>   tax_rate_id?: string | number | null | null,
>   ledger_account_id?: string | number | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[]
> ```

***

### update

`products.update`

Updates a product (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.products.update({
	id: '458026356994737217',
	product: { title: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `product` | `object` | No | — |

> [accordion] product full type
>
> ```ts theme={null}
> {
>   title?: string,
>   description?: string,
>   checkout_description?: string,
>   price?: string | number | null,
>   tax_rate_id?: string | number,
>   ledger_account_id?: string | number,
>   currency?: string,
>   frequency_type?: string,
>   frequency?: number,
>   product_type?: string,
>   vat_rate_type?: string,
>   checkout_type?: string,
>   max_amount_per_order?: number,
>   document_style_id?: string | number,
>   workflow_id?: string | number,
>   identifier?: string,
>   frequency_preset?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `description` | `string \| null \| null` | No | — |
| `title` | `string \| null \| null` | No | — |
| `identifier` | `string \| null \| null` | No | — |
| `price` | `string \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `frequency` | `number \| null \| null` | No | — |
| `frequency_type` | `string \| null \| null` | No | — |
| `tax_rate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null` | No | A unique record identifier |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

## Projects

### create

`projects.create`

Create a project; the name must be unique within the administration (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.projects.create({
	project: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `project` | `object` | No | — |

> [accordion] project full type
>
> ```ts theme={null}
> {
>   name: string,
>   budget?: string | number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `budget` | `number \| null \| null` | No | — |

***

### delete

`projects.delete`

Deletes a project (scope: settings)

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

```ts theme={null}
await corsair.moneybird.api.projects.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### get

`projects.get`

Returns information about a project (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.projects.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `budget` | `number \| null \| null` | No | — |

***

### list

`projects.list`

List all projects of an administration, one page at a time (scope: settings)

**Risk:** `read`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `state:active`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| - \| - \| - \| - \| \| state \| `String` \| `active` \| `all`, `active` or `archived`. Combine values with a pipe, e.g. `state:active\|archived` \| |
| `per_page` | `number \| string` | No | — |
| `page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   state?: string | null,
>   budget?: number | null | null
> }[]
> ```

***

### update

`projects.update`

Updates a project (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.projects.update({
	id: '458026356994737217',
	project: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `project` | `object` | No | — |

> [accordion] project full type
>
> ```ts theme={null}
> {
>   name: string,
>   budget?: string | number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `budget` | `number \| null \| null` | No | — |

***

## Purchase Transaction Batches

### createFromSepaFile

`purchaseTransactionBatches.createFromSepaFile`

Upload a SEPA credit transfer file to create purchase transaction batches: upload a SEPA credit transfer file (pain.001.001.09/Version 2019) to create purchase transaction batches (scope: bank)

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

```ts theme={null}
await corsair.moneybird.api.purchaseTransactionBatches.createFromSepaFile({
	file: { base64: 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPERvY3VtZW50IHhtbG5zPSJ1cm46aXNvOnN0ZDppc286MjAwMjI6dGVjaDp4c2Q6cGFpbi4wMDEuMDAxLjA5Ij48Q3N0bXJDZHRUcmZJbml0bj48R3JwSGRyPjxNc2dJZD5NQi0yMDI2LTA0LTA5LTE8L01zZ0lkPjxDcmVEdFRtPjIwMjYtMDQtMDlUMTA6MDA6MDA8L0NyZUR0VG0+PE5iT2ZUeHM+MTwvTmJPZlR4cz48Q3RybFN1bT4xMDAuMDA8L0N0cmxTdW0+PEluaXRnUHR5PjxObT5CZWFjaHkgQlY8L05tPjwvSW5pdGdQdHk+PC9HcnBIZHI+PFBtdEluZj48UG10SW5mSWQ+TUItMjAyNi0wNC0wOS0xLTE8L1BtdEluZklkPjxQbXRNdGQ+VFJGPC9QbXRNdGQ+PE5iT2ZUeHM+MTwvTmJPZlR4cz48Q3RybFN1bT4xMDAuMDA8L0N0cmxTdW0+PFBtdFRwSW5mPjxTdmNMdmw+PENkPlNFUEE8L0NkPjwvU3ZjTHZsPjwvUG10VHBJbmY+PFJlcWRFeGN0bkR0PjxEdD4yMDI2LTA0LTEwPC9EdD48L1JlcWRFeGN0bkR0PjxEYnRyPjxObT5CZWFjaHkgQlY8L05tPjwvRGJ0cj48RGJ0ckFjY3Q+PElkPjxJQkFOPk5MOTFBQk5BMDQxNzE2NDMwMDwvSUJBTj48L0lkPjwvRGJ0ckFjY3Q+PERidHJBZ3Q+PEZpbkluc3RuSWQ+PEJJQ0ZJPkFCTkFOTDJBPC9CSUNGST48L0Zpbkluc3RuSWQ+PC9EYnRyQWd0PjxDZHRUcmZUeEluZj48UG10SWQ+PEVuZFRvRW5kSWQ+SU5WLTIwMjYtMDA0MjwvRW5kVG9FbmRJZD48L1BtdElkPjxBbXQ+PEluc3RkQW10IENjeT0iRVVSIj4xMDAuMDA8L0luc3RkQW10PjwvQW10PjxDZHRyPjxObT5KYW5hIEJlcmdlcjwvTm0+PC9DZHRyPjxDZHRyQWNjdD48SWQ+PElCQU4+REU4OTM3MDQwMDQ0MDUzMjAxMzAwMDwvSUJBTj48L0lkPjwvQ2R0ckFjY3Q+PFJtdEluZj48VXN0cmQ+SW52b2ljZSAyMDI2LTAwNDI8L1VzdHJkPjwvUm10SW5mPjwvQ2R0VHJmVHhJbmY+PC9QbXRJbmY+PC9Dc3RtckNkdFRyZkluaXRuPjwvRG9jdW1lbnQ+Cg==', filename: 'payments.xml', contentType: 'application/xml' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `file` | `string \| object \| custom` | Yes | SEPA credit transfer file (pain.001.001.09/Version 2019) |
| `ledger_account_id` | `string \| number` | No | A unique record identifier |
| `financial_account_id` | `string \| number` | No | A unique record identifier |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   financial_account_id?: string | number | null,
>   state?: string | null,
>   identifier?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[]
> ```

***

### download

`purchaseTransactionBatches.download`

Download a purchase transaction batch as SEPA credit transfer file: download the purchase transaction batch as a SEPA credit transfer file (pain.001) (returned as a file) (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.purchaseTransactionBatches.download({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**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

`purchaseTransactionBatches.get`

Get a purchase transaction batch by id (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.purchaseTransactionBatches.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `financial_account_id` | `string \| number \| null` | No | A unique record identifier |
| `state` | `string \| null` | No | — |
| `identifier` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

## Purchase Transactions

### delete

`purchaseTransactions.delete`

Delete a purchase transaction (scope: bank)

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

```ts theme={null}
await corsair.moneybird.api.purchaseTransactions.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### get

`purchaseTransactions.get`

Get a purchase transaction by id (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.purchaseTransactions.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `financial_account_id` | `string \| number \| null` | No | A unique record identifier |
| `purchase_transaction_batch_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `payment_instrument_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `state` | `string \| null` | No | — |
| `sepa_iban` | `string \| null` | No | — |
| `sepa_iban_account_name` | `string \| null` | No | — |
| `sepa_bic` | `string \| null` | No | — |
| `source_sepa_iban` | `string \| null \| null` | No | — |
| `source_sepa_iban_account_name` | `string \| null \| null` | No | — |
| `date` | `string \| null \| null` | No | — |
| `description` | `string \| null` | No | — |
| `end_to_end_id` | `string \| null` | No | — |
| `contact` | `object \| null` | No | — |
| `amount` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `payable_type` | `string \| null \| null` | No | — |
| `payable_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `payment_method` | `string \| null \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null | null
> ```

***

### list

`purchaseTransactions.list`

List all purchase transactions, one page at a time (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.purchaseTransactions.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:open`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| --- \| --- \| --- \| --- \| \| state \| `String` \| `all` \| `all`, `open`, `pending_payment`, `paid` or `cancelled` \| \| period \| `String` \| `nil` \| This can either be the description of a period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom period (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. \| \| unbatched \| `Boolean` \| `true` \| `true` or `false` \| \| purchase\_transaction\_batch\_id \| `Integer` \| `nil` \| Only the purchase transactions of this purchase transaction batch. Combine it with `unbatched:false`, or leave `unbatched` out. \| You can filter by multiple states at the same time as well. To do this, separate the state values by a pipe: `state:open\|pending_payment`. |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   financial_account_id?: string | number | null,
>   purchase_transaction_batch_id?: string | number | null | null,
>   payment_instrument_id?: string | number | null | null,
>   state?: string | null,
>   sepa_iban?: string | null,
>   sepa_iban_account_name?: string | null,
>   sepa_bic?: string | null,
>   source_sepa_iban?: string | null | null,
>   source_sepa_iban_account_name?: string | null | null,
>   date?: string | null | null,
>   description?: string | null,
>   end_to_end_id?: string | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null | null,
>   amount?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   payable_type?: string | null | null,
>   payable_id?: string | number | null | null,
>   payment_method?: string | null | null
> }[]
> ```

***

## Recurring Sales Invoices

### create

`recurringSalesInvoices.create`

Creates a new recurring sales invoice: a recurring sales invoice will create new sales invoices on set intervals (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.recurringSalesInvoices.create({
	recurring_sales_invoice: { update_contact: true },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `recurring_sales_invoice` | `object` | No | — |

> [accordion] recurring\_sales\_invoice full type
>
> ```ts theme={null}
> {
>   document_style_id?: string | number,
>   contact_id?: string | number,
>   contact_person_id?: string | number,
>   update_contact?: boolean | string,
>   reference?: string,
>   invoice_date?: string,
>   workflow_id?: string | number,
>   currency?: string,
>   first_due_interval?: number,
>   prices_are_incl_tax?: boolean | string,
>   discount?: string | number | null,
>   frequency_type?: string,
>   frequency?: string,
>   has_desired_count?: boolean | string,
>   desired_count?: string,
>   auto_send?: boolean | string,
>   mergeable?: boolean | string,
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[],
>   custom_fields_attributes?: Record<string, {
>     id: string | number,
>     value: string
>   }> | {
>     id?: string | number,
>     value?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `start_date` | `string \| null` | No | — |
| `invoice_date` | `string \| null` | No | — |
| `last_date` | `string \| null \| null` | No | — |
| `active` | `boolean \| null \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `first_due_interval` | `number \| null` | No | — |
| `auto_send` | `boolean \| null \| null` | No | — |
| `sending_scheduled_at` | `string \| null \| null` | No | — |
| `sending_scheduled_user_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `frequency_type` | `string \| null` | No | — |
| `frequency` | `number \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `subscription` | `object \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] subscription full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   start_date?: string | null,
>   end_date?: string | null | null,
>   frequency?: number | null | null,
>   frequency_type?: string | null | null,
>   reference?: string | null | null,
>   cancelled_at?: string | null | null,
>   product_id?: string | number | null,
>   product?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     description?: string | null | null,
>     title?: string | null | null,
>     identifier?: string | null | null,
>     price?: string | null,
>     currency?: string | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     tax_rate_id?: string | number | null | null,
>     ledger_account_id?: string | number | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   } | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   subscription_products?: {
>     start_date?: string | null,
>     end_date?: string | null | null,
>     product_id?: string | number | null,
>     product?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       description?: string | null | null,
>       title?: string | null | null,
>       identifier?: string | null | null,
>       price?: string | null,
>       currency?: string | null,
>       frequency?: number | null | null,
>       frequency_type?: string | null | null,
>       tax_rate_id?: string | number | null | null,
>       ledger_account_id?: string | number | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | null,
>     amount?: string | null,
>     discount?: string | null | null
>   }[] | null,
>   recurring_sales_invoice_id?: string | number | null | null
> } | null | null
> ```

***

### deactivate

`recurringSalesInvoices.deactivate`

Deactivate a recurring sales invoice: stops a recurring sales invoice from creating new sales invoices (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.recurringSalesInvoices.deactivate({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `start_date` | `string \| null` | No | — |
| `invoice_date` | `string \| null` | No | — |
| `last_date` | `string \| null \| null` | No | — |
| `active` | `boolean \| null \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `first_due_interval` | `number \| null` | No | — |
| `auto_send` | `boolean \| null \| null` | No | — |
| `sending_scheduled_at` | `string \| null \| null` | No | — |
| `sending_scheduled_user_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `frequency_type` | `string \| null` | No | — |
| `frequency` | `number \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `subscription` | `object \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] subscription full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   start_date?: string | null,
>   end_date?: string | null | null,
>   frequency?: number | null | null,
>   frequency_type?: string | null | null,
>   reference?: string | null | null,
>   cancelled_at?: string | null | null,
>   product_id?: string | number | null,
>   product?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     description?: string | null | null,
>     title?: string | null | null,
>     identifier?: string | null | null,
>     price?: string | null,
>     currency?: string | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     tax_rate_id?: string | number | null | null,
>     ledger_account_id?: string | number | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   } | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   subscription_products?: {
>     start_date?: string | null,
>     end_date?: string | null | null,
>     product_id?: string | number | null,
>     product?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       description?: string | null | null,
>       title?: string | null | null,
>       identifier?: string | null | null,
>       price?: string | null,
>       currency?: string | null,
>       frequency?: number | null | null,
>       frequency_type?: string | null | null,
>       tax_rate_id?: string | number | null | null,
>       ledger_account_id?: string | number | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | null,
>     amount?: string | null,
>     discount?: string | null | null
>   }[] | null,
>   recurring_sales_invoice_id?: string | number | null | null
> } | null | null
> ```

***

### delete

`recurringSalesInvoices.delete`

Destroy or deactivate a recurring sales invoice: a recurring sales invoice will be destroyed if it has not created any sales invoices (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.recurringSalesInvoices.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### fetchByIds

`recurringSalesInvoices.fetchByIds`

Fetch recurring sales invoices with given IDs: given a list of recurring sales invoice IDs, returns the details of the recurring invoices (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.recurringSalesInvoices.fetchByIds({
	ids: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ids` | `(number \| string)[]` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   workflow_id?: string | number | null,
>   start_date?: string | null,
>   invoice_date?: string | null,
>   last_date?: string | null | null,
>   active?: boolean | null | null,
>   payment_conditions?: string | null | null,
>   reference?: string | null | null,
>   language?: string | null,
>   currency?: string | null,
>   discount?: string | null | null,
>   first_due_interval?: number | null,
>   auto_send?: boolean | null | null,
>   sending_scheduled_at?: string | null | null,
>   sending_scheduled_user_id?: string | number | null | null,
>   frequency_type?: string | null,
>   frequency?: number | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | null,
>   total_price_excl_tax_base?: string | null,
>   total_price_incl_tax?: string | null,
>   total_price_incl_tax_base?: string | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   subscription?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     start_date?: string | null,
>     end_date?: string | null | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     reference?: string | null | null,
>     cancelled_at?: string | null | null,
>     product_id?: string | number | null,
>     product?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       description?: string | null | null,
>       title?: string | null | null,
>       identifier?: string | null | null,
>       price?: string | null,
>       currency?: string | null,
>       frequency?: number | null | null,
>       frequency_type?: string | null | null,
>       tax_rate_id?: string | number | null | null,
>       ledger_account_id?: string | number | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | null,
>     contact_id?: string | number | null,
>     contact?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       company_name?: string | null | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       address1?: string | null | null,
>       address2?: string | null | null,
>       zipcode?: string | null | null,
>       city?: string | null | null,
>       country?: string | null,
>       phone?: string | null | null,
>       delivery_method?: string | null | null,
>       customer_id?: string | null,
>       tax_number?: string | null | null,
>       chamber_of_commerce?: string | null | null,
>       bank_account?: string | null | null,
>       is_trusted?: boolean | null,
>       max_transfer_amount?: string | null | null,
>       attention?: string | null | null,
>       email?: string | null | null,
>       email_ubl?: boolean | null,
>       send_invoices_to_attention?: string | null | null,
>       send_invoices_to_email?: string | null | null,
>       send_estimates_to_attention?: string | null | null,
>       send_estimates_to_email?: string | null | null,
>       send_reminders_to_attention?: string | null | null,
>       send_reminders_to_email?: string | null | null,
>       direct_debit?: boolean | null,
>       sepa_active?: boolean | null | null,
>       sepa_iban?: string | null | null,
>       sepa_iban_account_name?: string | null | null,
>       sepa_bic?: string | null | null,
>       sepa_mandate_id?: string | null | null,
>       sepa_mandate_date?: string | null | null,
>       sepa_sequence_type?: string | null,
>       credit_card_number?: string | null | null,
>       credit_card_reference?: string | null | null,
>       credit_card_type?: string | null | null,
>       tax_number_validated_at?: string | null | null,
>       tax_number_valid?: boolean | null | null,
>       invoice_workflow_id?: string | number | null | null,
>       estimate_workflow_id?: string | number | null | null,
>       si_identifier?: string | null | null,
>       si_identifier_type?: string | null | null,
>       moneybird_payments_mandate?: boolean | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null,
>       sales_invoices_url?: string | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       custom_fields?: {
>         id?: string | number | null,
>         name?: string | null,
>         value?: string | null
>       }[] | null,
>       contact_people?: {
>         id?: string | number | null | null,
>         contact_id?: string | number | null | null,
>         administration_id?: string | number | null,
>         firstname?: string | null | null,
>         lastname?: string | null | null,
>         phone?: string | null | null,
>         email?: string | null | null,
>         department?: string | null | null,
>         created_at?: string | null | null,
>         updated_at?: string | null | null,
>         version?: number | null
>       }[] | null,
>       archived?: boolean | null
>     } | null,
>     contact_person_id?: string | number | null | null,
>     contact_person?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     } | null | null,
>     subscription_products?: {
>       start_date?: string | null,
>       end_date?: string | null | null,
>       product_id?: string | number | null,
>       product?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         description?: string | null | null,
>         title?: string | null | null,
>         identifier?: string | null | null,
>         price?: string | null,
>         currency?: string | null,
>         frequency?: number | null | null,
>         frequency_type?: string | null | null,
>         tax_rate_id?: string | number | null | null,
>         ledger_account_id?: string | number | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       } | null,
>       amount?: string | null,
>       discount?: string | null | null
>     }[] | null,
>     recurring_sales_invoice_id?: string | number | null | null
>   } | null | null
> }[]
> ```

***

### get

`recurringSalesInvoices.get`

Get a recurring sales invoice by id (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.recurringSalesInvoices.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `start_date` | `string \| null` | No | — |
| `invoice_date` | `string \| null` | No | — |
| `last_date` | `string \| null \| null` | No | — |
| `active` | `boolean \| null \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `first_due_interval` | `number \| null` | No | — |
| `auto_send` | `boolean \| null \| null` | No | — |
| `sending_scheduled_at` | `string \| null \| null` | No | — |
| `sending_scheduled_user_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `frequency_type` | `string \| null` | No | — |
| `frequency` | `number \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `subscription` | `object \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] subscription full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   start_date?: string | null,
>   end_date?: string | null | null,
>   frequency?: number | null | null,
>   frequency_type?: string | null | null,
>   reference?: string | null | null,
>   cancelled_at?: string | null | null,
>   product_id?: string | number | null,
>   product?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     description?: string | null | null,
>     title?: string | null | null,
>     identifier?: string | null | null,
>     price?: string | null,
>     currency?: string | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     tax_rate_id?: string | number | null | null,
>     ledger_account_id?: string | number | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   } | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   subscription_products?: {
>     start_date?: string | null,
>     end_date?: string | null | null,
>     product_id?: string | number | null,
>     product?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       description?: string | null | null,
>       title?: string | null | null,
>       identifier?: string | null | null,
>       price?: string | null,
>       currency?: string | null,
>       frequency?: number | null | null,
>       frequency_type?: string | null | null,
>       tax_rate_id?: string | number | null | null,
>       ledger_account_id?: string | number | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | null,
>     amount?: string | null,
>     discount?: string | null | null
>   }[] | null,
>   recurring_sales_invoice_id?: string | number | null | null
> } | null | null
> ```

***

### list

`recurringSalesInvoices.list`

List all recurring sales invoices, one page at a time (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.recurringSalesInvoices.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `state:active,contact_id:123`). A filter key you leave out keeps its default below. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| --- \| --- \| --- \| --- \| \| state \| `String` \| `active` \| `active` or `inactive` \| \| frequency \| `String` \| `all` \| `all`, `day`, `week`, `month`, `quarter` or `year` \| \| auto\_send \| `Boolean` \| `null` \| `null`, `true` or `false` \| \| contact\_id \| `Integer` \| \| Filters recurring invoices by a single contact \| \| workflow\_id \| `Integer` \| \| Filters recurring invoices by a single workflow \| \| include\_subscriptions \| `Boolean` \| `false` \| Use `true` to include the recurring sales invoices that belong to a subscription \| |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   workflow_id?: string | number | null,
>   start_date?: string | null,
>   invoice_date?: string | null,
>   last_date?: string | null | null,
>   active?: boolean | null | null,
>   payment_conditions?: string | null | null,
>   reference?: string | null | null,
>   language?: string | null,
>   currency?: string | null,
>   discount?: string | null | null,
>   first_due_interval?: number | null,
>   auto_send?: boolean | null | null,
>   sending_scheduled_at?: string | null | null,
>   sending_scheduled_user_id?: string | number | null | null,
>   frequency_type?: string | null,
>   frequency?: number | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | null,
>   total_price_excl_tax_base?: string | null,
>   total_price_incl_tax?: string | null,
>   total_price_incl_tax_base?: string | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   subscription?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     start_date?: string | null,
>     end_date?: string | null | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     reference?: string | null | null,
>     cancelled_at?: string | null | null,
>     product_id?: string | number | null,
>     product?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       description?: string | null | null,
>       title?: string | null | null,
>       identifier?: string | null | null,
>       price?: string | null,
>       currency?: string | null,
>       frequency?: number | null | null,
>       frequency_type?: string | null | null,
>       tax_rate_id?: string | number | null | null,
>       ledger_account_id?: string | number | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | null,
>     contact_id?: string | number | null,
>     contact?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       company_name?: string | null | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       address1?: string | null | null,
>       address2?: string | null | null,
>       zipcode?: string | null | null,
>       city?: string | null | null,
>       country?: string | null,
>       phone?: string | null | null,
>       delivery_method?: string | null | null,
>       customer_id?: string | null,
>       tax_number?: string | null | null,
>       chamber_of_commerce?: string | null | null,
>       bank_account?: string | null | null,
>       is_trusted?: boolean | null,
>       max_transfer_amount?: string | null | null,
>       attention?: string | null | null,
>       email?: string | null | null,
>       email_ubl?: boolean | null,
>       send_invoices_to_attention?: string | null | null,
>       send_invoices_to_email?: string | null | null,
>       send_estimates_to_attention?: string | null | null,
>       send_estimates_to_email?: string | null | null,
>       send_reminders_to_attention?: string | null | null,
>       send_reminders_to_email?: string | null | null,
>       direct_debit?: boolean | null,
>       sepa_active?: boolean | null | null,
>       sepa_iban?: string | null | null,
>       sepa_iban_account_name?: string | null | null,
>       sepa_bic?: string | null | null,
>       sepa_mandate_id?: string | null | null,
>       sepa_mandate_date?: string | null | null,
>       sepa_sequence_type?: string | null,
>       credit_card_number?: string | null | null,
>       credit_card_reference?: string | null | null,
>       credit_card_type?: string | null | null,
>       tax_number_validated_at?: string | null | null,
>       tax_number_valid?: boolean | null | null,
>       invoice_workflow_id?: string | number | null | null,
>       estimate_workflow_id?: string | number | null | null,
>       si_identifier?: string | null | null,
>       si_identifier_type?: string | null | null,
>       moneybird_payments_mandate?: boolean | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null,
>       sales_invoices_url?: string | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       custom_fields?: {
>         id?: string | number | null,
>         name?: string | null,
>         value?: string | null
>       }[] | null,
>       contact_people?: {
>         id?: string | number | null | null,
>         contact_id?: string | number | null | null,
>         administration_id?: string | number | null,
>         firstname?: string | null | null,
>         lastname?: string | null | null,
>         phone?: string | null | null,
>         email?: string | null | null,
>         department?: string | null | null,
>         created_at?: string | null | null,
>         updated_at?: string | null | null,
>         version?: number | null
>       }[] | null,
>       archived?: boolean | null
>     } | null,
>     contact_person_id?: string | number | null | null,
>     contact_person?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     } | null | null,
>     subscription_products?: {
>       start_date?: string | null,
>       end_date?: string | null | null,
>       product_id?: string | number | null,
>       product?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         description?: string | null | null,
>         title?: string | null | null,
>         identifier?: string | null | null,
>         price?: string | null,
>         currency?: string | null,
>         frequency?: number | null | null,
>         frequency_type?: string | null | null,
>         tax_rate_id?: string | number | null | null,
>         ledger_account_id?: string | number | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       } | null,
>       amount?: string | null,
>       discount?: string | null | null
>     }[] | null,
>     recurring_sales_invoice_id?: string | number | null | null
>   } | null | null
> }[]
> ```

***

### listVersions

`recurringSalesInvoices.listVersions`

List all IDs and versions (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.recurringSalesInvoices.listVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Comma-separated `key:value` filter terms. Same syntax as `GET /recurring_sales_invoices` — see that operation's description for the available keys. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   version?: number | string | null
> }[]
> ```

***

### notes.create

`recurringSalesInvoices.notes.create`

Adds note to entity: adds a note to the recurring sales invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.recurringSalesInvoices.notes.create({
	recurring_sales_invoice_id: '458026356994737217',
	note: { note: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `recurring_sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `note` | `object` | No | — |

> [accordion] note full type
>
> ```ts theme={null}
> {
>   note?: string,
>   todo?: boolean | string,
>   assignee_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `entity_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `entity_type` | `string \| null` | No | — |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo` | `boolean \| string \| null \| null` | No | — |
| `note` | `string \| null \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `completed_by_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo_type` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

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

***

### notes.delete

`recurringSalesInvoices.notes.delete`

Destroys note from entity (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.recurringSalesInvoices.notes.delete({ recurring_sales_invoice_id: '458026356994737217', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `recurring_sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### update

`recurringSalesInvoices.update`

Updates a recurring sales invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.recurringSalesInvoices.update({
	id: '458026356994737217',
	recurring_sales_invoice: { update_contact: true },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `recurring_sales_invoice` | `object` | No | — |

> [accordion] recurring\_sales\_invoice full type
>
> ```ts theme={null}
> {
>   document_style_id?: string | number,
>   contact_id?: string | number,
>   contact_person_id?: string | number | null,
>   update_contact?: boolean | string,
>   reference?: string,
>   invoice_date?: string,
>   workflow_id?: string | number,
>   currency?: string,
>   first_due_interval?: number,
>   prices_are_incl_tax?: boolean | string,
>   discount?: string | number | null,
>   frequency_type?: string,
>   frequency?: string,
>   has_desired_count?: boolean | string,
>   desired_count?: string,
>   auto_send?: boolean | string,
>   mergeable?: boolean | string,
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[],
>   custom_fields_attributes?: Record<string, {
>     id: string | number,
>     value: string
>   }> | {
>     id?: string | number,
>     value?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `start_date` | `string \| null` | No | — |
| `invoice_date` | `string \| null` | No | — |
| `last_date` | `string \| null \| null` | No | — |
| `active` | `boolean \| null \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `first_due_interval` | `number \| null` | No | — |
| `auto_send` | `boolean \| null \| null` | No | — |
| `sending_scheduled_at` | `string \| null \| null` | No | — |
| `sending_scheduled_user_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `frequency_type` | `string \| null` | No | — |
| `frequency` | `number \| null` | No | — |
| `created_at` | `string \| null \| null` | No | — |
| `updated_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `subscription` | `object \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] subscription full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   start_date?: string | null,
>   end_date?: string | null | null,
>   frequency?: number | null | null,
>   frequency_type?: string | null | null,
>   reference?: string | null | null,
>   cancelled_at?: string | null | null,
>   product_id?: string | number | null,
>   product?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     description?: string | null | null,
>     title?: string | null | null,
>     identifier?: string | null | null,
>     price?: string | null,
>     currency?: string | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     tax_rate_id?: string | number | null | null,
>     ledger_account_id?: string | number | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   } | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   subscription_products?: {
>     start_date?: string | null,
>     end_date?: string | null | null,
>     product_id?: string | number | null,
>     product?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       description?: string | null | null,
>       title?: string | null | null,
>       identifier?: string | null | null,
>       price?: string | null,
>       currency?: string | null,
>       frequency?: number | null | null,
>       frequency_type?: string | null | null,
>       tax_rate_id?: string | number | null | null,
>       ledger_account_id?: string | number | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | null,
>     amount?: string | null,
>     discount?: string | null | null
>   }[] | null,
>   recurring_sales_invoice_id?: string | number | null | null
> } | null | null
> ```

***

## Reports

### assets

`reports.assets`

Assets report: get the assets report for the administration (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.assets({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   asset_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   name?: string | null,
>   purchase_date?: string | null,
>   lifespan?: string | null | null,
>   purchase_value?: string | null,
>   calculated_purchase_value?: string | null,
>   residual_value?: string | null,
>   total_value_changes_since_purchase?: string | null,
>   value_at_begin?: string | null,
>   investment?: string | null,
>   depreciation?: string | null,
>   divestment?: string | null,
>   value_changes?: string | null,
>   value_at_end?: string | null,
>   value_not_in_use?: string | null
> }[]
> ```

***

### balanceSheet

`reports.balanceSheet`

Balance sheet report: get the balance sheet report for the administration showing the financial position at the end of the specified period (scope: bank)

**Risk:** `read`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `debit` | `object \| null` | No | Debit side of the balance sheet (assets) |
| `credit` | `object \| null` | No | Credit side of the balance sheet (equity and liabilities) |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] debit full type
>
> ```ts theme={null}
> {
>   total?: string | null,
>   current_assets?: {
>     ledger_account_id?: string | null,
>     value?: string | null,
>     children?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   }[] | null,
>   non_current_assets?: {
>     ledger_account_id?: string | null,
>     value?: string | null,
>     children?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] credit full type
>
> ```ts theme={null}
> {
>   total?: string | null,
>   equity?: {
>     ledger_account_id?: string | null,
>     value?: string | null,
>     children?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   }[] | null,
>   provisions?: {
>     ledger_account_id?: string | null,
>     value?: string | null,
>     children?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   }[] | null,
>   non_current_liabilities?: {
>     ledger_account_id?: string | null,
>     value?: string | null,
>     children?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   }[] | null,
>   current_liabilities?: {
>     ledger_account_id?: string | null,
>     value?: string | null,
>     children?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   }[] | null,
>   open_years?: {
>     year?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   debit?: {
>     total?: string | null,
>     current_assets?: {
>       ledger_account_id?: string | null,
>       value?: string | null,
>       children?: {
>         ledger_account_id?: string | null,
>         value?: string | null
>       }[] | null
>     }[] | null,
>     non_current_assets?: {
>       ledger_account_id?: string | null,
>       value?: string | null,
>       children?: {
>         ledger_account_id?: string | null,
>         value?: string | null
>       }[] | null
>     }[] | null
>   } | null,
>   credit?: {
>     total?: string | null,
>     equity?: {
>       ledger_account_id?: string | null,
>       value?: string | null,
>       children?: {
>         ledger_account_id?: string | null,
>         value?: string | null
>       }[] | null
>     }[] | null,
>     provisions?: {
>       ledger_account_id?: string | null,
>       value?: string | null,
>       children?: {
>         ledger_account_id?: string | null,
>         value?: string | null
>       }[] | null
>     }[] | null,
>     non_current_liabilities?: {
>       ledger_account_id?: string | null,
>       value?: string | null,
>       children?: {
>         ledger_account_id?: string | null,
>         value?: string | null
>       }[] | null
>     }[] | null,
>     current_liabilities?: {
>       ledger_account_id?: string | null,
>       value?: string | null,
>       children?: {
>         ledger_account_id?: string | null,
>         value?: string | null
>       }[] | null
>     }[] | null,
>     open_years?: {
>       year?: string | null,
>       value?: string | null
>     }[] | null
>   } | null
> }[] | null
> ```

***

### bankBalance

`reports.bankBalance`

Bank balance report: get the booked balance of each financial account at the end of the specified period (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.bankBalance({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `string \| null` | No | The total of `financial_accounts`, the same as `closing_balance` of the cash flow report |
| `financial_accounts` | `object[] \| null` | No | The booked balance of every financial account except private withdrawal accounts. Like the balance sheet, an account with a zero balance in every period is left out. |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] financial\_accounts full type
>
> ```ts theme={null}
> {
>   financial_account_id?: string | number | null,
>   name?: string | null,
>   type?: string | null,
>   balance?: string | null
> }[] | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   total?: string | null,
>   financial_accounts?: {
>     financial_account_id?: string | number | null,
>     name?: string | null,
>     type?: string | null,
>     balance?: string | null
>   }[] | null
> }[] | null
> ```

***

### cashFlow

`reports.cashFlow`

Cash flow report: get the cash flow report for the administration showing cash received and cash paid during the specified period (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.cashFlow({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |
| `financial_account_id` | `string \| number` | No | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cash_received_by_ledger_account` | `object \| null` | No | Data grouped by ledger account. Contains an array of ledger account entries with ledger\_account\_id and value. |
| `cash_paid_by_ledger_account` | `object \| null` | No | Data grouped by ledger account. Contains an array of ledger account entries with ledger\_account\_id and value. |
| `opening_balance` | `string \| null` | No | The balance of the financial accounts at the start of the period |
| `closing_balance` | `string \| null` | No | The balance of the financial accounts at the end of the period |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] cash\_received\_by\_ledger\_account full type
>
> ```ts theme={null}
> {
>   ledger_accounts?: {
>     ledger_account_id?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] cash\_paid\_by\_ledger\_account full type
>
> ```ts theme={null}
> {
>   ledger_accounts?: {
>     ledger_account_id?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   cash_received_by_ledger_account?: {
>     ledger_accounts?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   } | null,
>   cash_paid_by_ledger_account?: {
>     ledger_accounts?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   } | null,
>   opening_balance?: string | null,
>   closing_balance?: string | null
> }[] | null
> ```

***

### creditors

`reports.creditors`

Creditors report (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.creditors({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `creditors` | `object[] \| null` | No | — |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] creditors full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number | null | null,
>   amount?: string | null
> }[] | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   creditors?: {
>     contact_id?: string | number | null | null,
>     amount?: string | null
>   }[] | null
> }[] | null
> ```

***

### creditorsAging

`reports.creditorsAging`

Creditors aging report (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.creditorsAging({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period_until` | `string` | No | A period until which a report should be generated. **Date range formats:** - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `this_year` - Current year - `prev_year` - Previous year |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

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

> [accordion] creditors full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number | null | null,
>   amount?: string | null,
>   aging_buckets?: {
>     name?: string | null,
>     amount?: string | null
>   }[] | null
> }[] | null
> ```

***

### debtors

`reports.debtors`

Debtors report (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.debtors({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `debtors` | `object[] \| null` | No | — |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] debtors full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number | null | null,
>   amount?: string | null
> }[] | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   debtors?: {
>     contact_id?: string | number | null | null,
>     amount?: string | null
>   }[] | null
> }[] | null
> ```

***

### debtorsAging

`reports.debtorsAging`

Debtors aging report (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.debtorsAging({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period_until` | `string` | No | A period until which a report should be generated. **Date range formats:** - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `this_year` - Current year - `prev_year` - Previous year |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

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

> [accordion] debtors full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number | null | null,
>   amount?: string | null,
>   aging_buckets?: {
>     name?: string | null,
>     amount?: string | null
>   }[] | null
> }[] | null
> ```

***

### expensesByContact

`reports.expensesByContact`

Expenses by contact report (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.expensesByContact({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |
| `contact_id` | `string \| number` | No | A unique record identifier |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expenses_by_contact` | `object[] \| null` | No | — |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] expenses\_by\_contact full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number | null | null,
>   amount?: string | null
> }[] | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   expenses_by_contact?: {
>     contact_id?: string | number | null | null,
>     amount?: string | null
>   }[] | null
> }[] | null
> ```

***

### expensesByProject

`reports.expensesByProject`

Expenses by project report (scope: documents)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.expensesByProject({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expenses_by_project` | `object[] \| null` | No | — |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] expenses\_by\_project full type
>
> ```ts theme={null}
> {
>   project_id?: string | number | null | null,
>   amount?: string | null
> }[] | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   expenses_by_project?: {
>     project_id?: string | number | null | null,
>     amount?: string | null
>   }[] | null
> }[] | null
> ```

***

### exportAuditfile

`reports.exportAuditfile`

Export auditfile: queue the export of an auditfile (XAF XML format) for the specified year (scopes: bank, documents, estimates, sales\_invoices and settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.reports.exportAuditfile({ year: '2026' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `year` | `string` | Yes | The year for which to generate the auditfile |
| `version` | `3.2 \| 4.0` | No | The XAF version of the auditfile |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### exportBrugstaat

`reports.exportBrugstaat`

Export brugstaat: queue the export of a brugstaat XML file for the specified year (scopes: bank, documents and sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.reports.exportBrugstaat({ year: '2026' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `year` | `string` | Yes | The year for which to generate the brugstaat |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### exportLedgerAccounts

`reports.exportLedgerAccounts`

Export ledger accounts: queue the export of ledger accounts (grootboekkaarten) to an Excel file for the specified year (scopes: documents and sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.reports.exportLedgerAccounts({ year: '2026' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `year` | `string` | Yes | The year for which to generate the ledger accounts |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### generalLedger

`reports.generalLedger`

General ledger report: get the general ledger report for the administration showing all ledger accounts with their balances and movements during the specified period (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.generalLedger({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `debit_sums` | `object \| null` | No | Data grouped by ledger account. Contains an array of ledger account entries with ledger\_account\_id and value. |
| `credit_sums` | `object \| null` | No | Data grouped by ledger account. Contains an array of ledger account entries with ledger\_account\_id and value. |
| `start_balance` | `object \| null` | No | Data grouped by ledger account. Contains an array of ledger account entries with ledger\_account\_id and value. |
| `final_balance` | `object \| null` | No | Data grouped by ledger account. Contains an array of ledger account entries with ledger\_account\_id and value. |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] debit\_sums full type
>
> ```ts theme={null}
> {
>   ledger_accounts?: {
>     ledger_account_id?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] credit\_sums full type
>
> ```ts theme={null}
> {
>   ledger_accounts?: {
>     ledger_account_id?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] start\_balance full type
>
> ```ts theme={null}
> {
>   ledger_accounts?: {
>     ledger_account_id?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] final\_balance full type
>
> ```ts theme={null}
> {
>   ledger_accounts?: {
>     ledger_account_id?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   debit_sums?: {
>     ledger_accounts?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   } | null,
>   credit_sums?: {
>     ledger_accounts?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   } | null,
>   start_balance?: {
>     ledger_accounts?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   } | null,
>   final_balance?: {
>     ledger_accounts?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   } | null
> }[] | null
> ```

***

### journalEntries

`reports.journalEntries`

Journal entries report: get the journal entries report showing all bookings within the specified period, one page at a time; needs contact\_id, project\_id or ledger\_account\_id (scopes: documents and sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.journalEntries({ ledger_account_id: '458026356994737217', period: 'this_year' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |
| `project_id` | `string` | No | Filter by project ID, use "null" to filter entries without project |
| `contact_id` | `string` | No | Filter by contact ID, use "null" to filter entries without contact |
| `ledger_account_id` | `string \| number` | No | A unique record identifier |
| `account_type` | `non_current_assets \| current_assets \| equity \| non_current_liabilities \| current_liabilities \| revenue \| direct_costs \| expenses \| other_income_expenses \| other \| temporary \| provisions` | No | Filter by ledger account type |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   date?: string | null,
>   document_type?: string | null,
>   document_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   tax_rate_id?: string | number | null | null,
>   financial_account_id?: string | number | null | null,
>   amount?: string | null,
>   description?: string | null
> }[]
> ```

***

### profitLoss

`reports.profitLoss`

Profit loss report: get the profit loss report for the administration (scopes: documents and sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.profitLoss({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |
| `project_id` | `string \| number` | No | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `revenue_by_ledger_account` | `object \| null` | No | Data grouped by ledger account. Contains an array of ledger account entries with ledger\_account\_id and value. |
| `direct_costs_by_ledger_account` | `object \| null` | No | Data grouped by ledger account. Contains an array of ledger account entries with ledger\_account\_id and value. |
| `expenses_by_ledger_account` | `object \| null` | No | Data grouped by ledger account. Contains an array of ledger account entries with ledger\_account\_id and value. |
| `other_income_expenses_by_ledger_account` | `object \| null` | No | Data grouped by ledger account. Contains an array of ledger account entries with ledger\_account\_id and value. |
| `gross_profit` | `string \| null` | No | `total_revenue` minus the total of `direct_costs_by_ledger_account` |
| `operating_profit` | `string \| null` | No | `gross_profit` minus the total of `expenses_by_ledger_account`, so excluding other income and expenses |
| `net_profit` | `string \| null` | No | `total_revenue` minus `total_expenses` |
| `total_expenses` | `string \| null` | No | The total of `direct_costs_by_ledger_account` plus `expenses_by_ledger_account` minus `other_income_expenses_by_ledger_account` |
| `total_revenue` | `string \| null` | No | The total of `revenue_by_ledger_account` |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] revenue\_by\_ledger\_account full type
>
> ```ts theme={null}
> {
>   ledger_accounts?: {
>     ledger_account_id?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] direct\_costs\_by\_ledger\_account full type
>
> ```ts theme={null}
> {
>   ledger_accounts?: {
>     ledger_account_id?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] expenses\_by\_ledger\_account full type
>
> ```ts theme={null}
> {
>   ledger_accounts?: {
>     ledger_account_id?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] other\_income\_expenses\_by\_ledger\_account full type
>
> ```ts theme={null}
> {
>   ledger_accounts?: {
>     ledger_account_id?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   revenue_by_ledger_account?: {
>     ledger_accounts?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   } | null,
>   direct_costs_by_ledger_account?: {
>     ledger_accounts?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   } | null,
>   expenses_by_ledger_account?: {
>     ledger_accounts?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   } | null,
>   other_income_expenses_by_ledger_account?: {
>     ledger_accounts?: {
>       ledger_account_id?: string | null,
>       value?: string | null
>     }[] | null
>   } | null,
>   gross_profit?: string | null,
>   operating_profit?: string | null,
>   net_profit?: string | null,
>   total_expenses?: string | null,
>   total_revenue?: string | null
> }[] | null
> ```

***

### revenueByContact

`reports.revenueByContact`

Revenue by contact report (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.revenueByContact({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |
| `contact_id` | `string \| number` | No | A unique record identifier |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `revenue_by_contact` | `object[] \| null` | No | — |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] revenue\_by\_contact full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number | null | null,
>   amount?: string | null
> }[] | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   revenue_by_contact?: {
>     contact_id?: string | number | null | null,
>     amount?: string | null
>   }[] | null
> }[] | null
> ```

***

### revenueByProject

`reports.revenueByProject`

Revenue by project report (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.revenueByProject({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `revenue_by_project` | `object[] \| null` | No | — |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] revenue\_by\_project full type
>
> ```ts theme={null}
> {
>   project_id?: string | number | null | null,
>   amount?: string | null
> }[] | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   revenue_by_project?: {
>     project_id?: string | number | null | null,
>     amount?: string | null
>   }[] | null
> }[] | null
> ```

***

### subscriptions

`reports.subscriptions`

Subscriptions report: get the subscriptions report for the administration (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.subscriptions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `monthly_recurring_revenue` | `string \| null` | No | — |
| `annual_run_rate` | `string \| null` | No | — |
| `churn_rate` | `string \| null` | No | — |
| `lifetime_value` | `string \| null` | No | — |

***

### tax

`reports.tax`

Tax report: get the tax report for the administration (scopes: documents and sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.tax({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tax_rates` | `object[] \| null` | No | — |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] tax\_rates full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   name?: string | null,
>   percentage?: string | null | null,
>   report_reference?: string | null,
>   amount?: string | null,
>   type?: string | null,
>   tax?: string | null
> }[] | null
> ```

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   tax_rates?: {
>     tax_rate_id?: string | number | null,
>     name?: string | null,
>     percentage?: string | null | null,
>     report_reference?: string | null,
>     amount?: string | null,
>     type?: string | null,
>     tax?: string | null
>   }[] | null
> }[] | null
> ```

***

### workingCapital

`reports.workingCapital`

Working capital report: get the working capital of the administration at the end of the specified period, with the same figures as the balance card on the reports page (scope: bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.reports.workingCapital({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `period` | `string` | No | The period can be a date range or one of the presets. Date ranges must consist of whole months (start on 1st, end on last day of month). **Date range formats:** - `YYYYMMDD..YYYYMMDD` (e.g., `20250101..20250131`) - `YYYYMM..YYYYMM` (e.g., `202501..202501`) - `YYYYMM` (e.g., `202501`) **Preset options:** - `this_month` - Current month (default if not specified) - `prev_month` - Previous month - `next_month` - Next month - `this_quarter` - Current quarter - `prev_quarter` - Previous quarter - `next_quarter` - Next quarter - `this_year` - Current year - `prev_year` - Previous year - `next_year` - Next year **Maximum period: 12 months.** |
| `granularity` | `month \| quarter \| year` | No | Splits the report into periods of a month, a quarter or a year. The response then also contains `periods`, with the same fields for each period. The first and the last period are cut off at the start and the end of `period`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `working_capital` | `string \| null` | No | Current assets minus current liabilities |
| `bank` | `string \| null` | No | The balance of the financial accounts, or zero when that balance is negative |
| `to_receive` | `string \| null` | No | The current assets other than `bank` |
| `to_pay` | `string \| null` | No | The current liabilities, including a negative balance of the financial accounts |
| `periods` | `object[] \| null` | No | Only present when `granularity` is given. One item for each month, quarter or year in `period`, oldest first. |

> [accordion] periods full type
>
> ```ts theme={null}
> {
>   period?: string | null,
>   working_capital?: string | null,
>   bank?: string | null,
>   to_receive?: string | null,
>   to_pay?: string | null
> }[] | null
> ```

***

## Sales Invoices

### attachments.create

`salesInvoices.attachments.create`

Add attachment to sales invoice: add an attachment to a sales invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.attachments.create({
	id: '458026356994737217',
	file: { base64: 'JVBERi0xLjQKJSVFT0YK', filename: 'invoice.pdf', contentType: 'application/pdf' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `file` | `string \| object \| custom` | No | A file: a public URL to it, or \{url, filename?, contentType?}, or \{base64, filename?, contentType?} for a small one. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `number`

***

### attachments.delete

`salesInvoices.attachments.delete`

Delete an attachment (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.salesInvoices.attachments.delete({ sales_invoice_id: '437485325512000001', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### attachments.download

`salesInvoices.attachments.download`

Download attachment: download the attachment (returned as a file) (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.attachments.download({ sales_invoice_id: '437485325512000001', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**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. |

***

### create

`salesInvoices.create`

Create a sales invoice: create a sales invoice with the parameters defined in the request body (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.create({
	sales_invoice: {
		contact_id: '387172987357643188',
		invoice_date: '2026-04-01',
		details_attributes: [{ description: 'Project management', price: '1000.00', amount: '1' }],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `sales_invoice` | `object` | Yes | — |
| `from_payment_request` | `boolean \| string` | No | Set to `true` when the invoice was created from a Moneybird payment request. |

> [accordion] sales\_invoice full type
>
> ```ts theme={null}
> {
>   contact_id: string | number,
>   contact_person_id?: string | number,
>   original_estimate_id?: string | number,
>   document_style_id?: string | number,
>   workflow_id?: string | number,
>   reference?: string,
>   invoice_sequence_id?: string | number,
>   invoice_date?: string,
>   first_due_interval?: number,
>   currency?: string,
>   prices_are_incl_tax?: boolean | string,
>   payment_conditions?: string,
>   discount?: string | number | null,
>   time_entry_ids?: (string | number)[],
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[],
>   custom_fields_attributes?: Record<string, {
>     id: string | number,
>     value: string
>   }> | {
>     id?: string | number,
>     value?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### delete

`salesInvoices.delete`

Delete a sales invoice (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.salesInvoices.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### downloadPackingSlipPdf

`salesInvoices.downloadPackingSlipPdf`

Download sales invoice packing slip PDF by id: redirects to the download URL of the sales invoice as packing slip PDF (returned as a file) (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.downloadPackingSlipPdf({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `media` | `string` | No | In case you want to hide sender address and logo you can set this to 'stationery'. |

**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. |

***

### downloadPdf

`salesInvoices.downloadPdf`

Download sales invoice PDF by id: redirects to the download URL of the sales invoice as PDF (returned as a file) (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.downloadPdf({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `media` | `string` | No | In case you want to hide sender address and logo you can set this to 'stationery'. |

**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. |

***

### downloadUbl

`salesInvoices.downloadUbl`

Download sales invoice UBL by id: download the sales invoice as UBL (returned as a file) (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.downloadUbl({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**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. |

***

### duplicateAsCreditInvoice

`salesInvoices.duplicateAsCreditInvoice`

Duplicate to credit invoice: duplicate a sales invoice to a new credit invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.duplicateAsCreditInvoice({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `detail_ids` | `(string \| number)[]` | No | The invoice lines to credit. When left out, all lines of the invoice are credited. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### fetchByIds

`salesInvoices.fetchByIds`

Fetch sales invoices with given ids: given a list of sales invoice ids, returns the sales invoice information belonging to the invoices (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.fetchByIds({
	ids: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `ids` | `(number \| string)[]` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   invoice_id?: string | null | null,
>   recurring_sales_invoice_id?: string | number | null | null,
>   subscription_id?: string | number | null | null,
>   workflow_id?: string | number | null,
>   document_style_id?: string | number | null,
>   identity_id?: string | number | null,
>   draft_id?: number | null | null,
>   state?: string | null,
>   invoice_date?: string | null | null,
>   due_date?: string | null,
>   payment_conditions?: string | null | null,
>   payment_reference?: string | null | null,
>   short_payment_reference?: string | null | null,
>   reference?: string | null | null,
>   language?: string | null | null,
>   currency?: string | null,
>   discount?: string | null | null,
>   original_sales_invoice_id?: string | number | null | null,
>   paused?: boolean | null,
>   paid_at?: string | null | null,
>   sent_at?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   public_view_code?: string | null | null,
>   public_view_code_expires_at?: string | null | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   total_paid?: string | null,
>   total_unpaid?: string | null,
>   total_unpaid_base?: string | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | null,
>   total_price_excl_tax_base?: string | null,
>   total_price_incl_tax?: string | null,
>   total_price_incl_tax_base?: string | null,
>   total_discount?: string | null,
>   marked_dubious_on?: string | null | null,
>   marked_uncollectible_on?: string | null | null,
>   reminder_count?: number | null | null,
>   next_reminder?: string | null | null,
>   original_estimate_id?: string | number | null | null,
>   url?: string | null,
>   payment_url?: string | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   tax_totals?: {
>     tax_rate_id?: string | number | null,
>     taxable_amount?: string | number | null | null,
>     taxable_amount_base?: string | number | null | null,
>     tax_amount?: string | number | null | null,
>     tax_amount_base?: string | number | null | null
>   }[] | null,
>   time_entries?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     contact_id?: string | number | null | null,
>     project_id?: string | number | null | null,
>     user_id?: string | number | null,
>     started_at?: string | null,
>     ended_at?: string | null,
>     description?: string | null | null,
>     paused_duration?: number | null,
>     billable?: boolean | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### get

`salesInvoices.get`

Get an invoice by id (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### getByInvoiceId

`salesInvoices.getByInvoiceId`

Get an invoice by invoice\_id: get a sales invoice by the invoice\_id field of the sales invoice (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.getByInvoiceId({ invoice_id: '2026-0001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `invoice_id` | `string` | Yes | Unique invoice identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### getByReference

`salesInvoices.getByReference`

Get an invoice by reference: get a sales invoice by the reference field of the sales invoice (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.getByReference({ reference: 'PO-42' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `reference` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### list

`salesInvoices.list`

List sales invoices with a filter string such as 'state:open|paid' or 'period:this\_year', one page at a time (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.list({ filter: 'state:open|late', per_page: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:all`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| - \| - \| - \| - \| \| state \| `String` \| `all` \| `all`, `draft`, `open`, `scheduled`, `pending_payment`, `late`, `reminded`, `paid` or `uncollectible` \| \| period \| `String` \| `this_year` \| Matches on the invoice date. A period description (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom period (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| reference \| `String` \| \| Select invoices with a certain reference \| \| contact\_id \| `Integer` \| \| Select invoices belonging to a certain contact \| \| recurring\_sales\_invoice\_id \| `Integer` \| \| Select invoices created by a certain recurring invoice \| \| workflow\_id \| `Integer` \| \| Select invoices that use a certain workflow \| \| created\_after \| `String` \| \| Select invoices created after the given time (exclusive). ISO 8601 formatted string. The time to compare with is in UTC timezone \| \| updated\_after \| `String` \| \| Select invoices updated after the given time (exclusive). ISO 8601 formatted string. The time to compare with is in UTC timezone \| The `period` filter matches on the invoice date. It does not look at the `period` of the individual details, which says which months the expenses belong to. Read `details[].period` in the response when you need those months, or use the reports endpoints, which already spread the amounts over that period. A detail's period can fall outside the filtered range, however wide you make it, so this filter cannot tell you which periods amounts fall in. Use the reports endpoints for that. You can filter by multiple states at the same time by separating the values with a pipe (`state:draft\|scheduled`). This also holds for the reference. A draft with no `invoice_date` set is only matched by a `period` when that period contains today. To list drafts irrespective of date, pass `state:draft` without a `period`; to narrow them down in time, use `created_after` or `updated_after`. |
| `page` | `number \| string` | No | — |
| `sort` | `date_desc \| date_asc` | No | Sorts the list on date, so the newest (`date_desc`) or the oldest (`date_asc`) items come first. |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   invoice_id?: string | null | null,
>   recurring_sales_invoice_id?: string | number | null | null,
>   subscription_id?: string | number | null | null,
>   workflow_id?: string | number | null,
>   document_style_id?: string | number | null,
>   identity_id?: string | number | null,
>   draft_id?: number | null | null,
>   state?: string | null,
>   invoice_date?: string | null | null,
>   due_date?: string | null,
>   payment_conditions?: string | null | null,
>   payment_reference?: string | null | null,
>   short_payment_reference?: string | null | null,
>   reference?: string | null | null,
>   language?: string | null | null,
>   currency?: string | null,
>   discount?: string | null | null,
>   original_sales_invoice_id?: string | number | null | null,
>   paused?: boolean | null,
>   paid_at?: string | null | null,
>   sent_at?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   public_view_code?: string | null | null,
>   public_view_code_expires_at?: string | null | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   total_paid?: string | null,
>   total_unpaid?: string | null,
>   total_unpaid_base?: string | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | null,
>   total_price_excl_tax_base?: string | null,
>   total_price_incl_tax?: string | null,
>   total_price_incl_tax_base?: string | null,
>   total_discount?: string | null,
>   marked_dubious_on?: string | null | null,
>   marked_uncollectible_on?: string | null | null,
>   reminder_count?: number | null | null,
>   next_reminder?: string | null | null,
>   original_estimate_id?: string | number | null | null,
>   url?: string | null,
>   payment_url?: string | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   tax_totals?: {
>     tax_rate_id?: string | number | null,
>     taxable_amount?: string | number | null | null,
>     taxable_amount_base?: string | number | null | null,
>     tax_amount?: string | number | null | null,
>     tax_amount_base?: string | number | null | null
>   }[] | null,
>   time_entries?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     contact_id?: string | number | null | null,
>     project_id?: string | number | null | null,
>     user_id?: string | number | null,
>     started_at?: string | null,
>     ended_at?: string | null,
>     description?: string | null | null,
>     paused_duration?: number | null,
>     billable?: boolean | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### listVersions

`salesInvoices.listVersions`

List all ids and versions (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.listVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Comma-separated `key:value` filter terms. Same syntax as `GET /sales_invoices` — see that operation's description for the available keys. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   version?: number | string | null
> }[]
> ```

***

### markAsDubious

`salesInvoices.markAsDubious`

Mark as dubious: this endpoint marks a sales invoice as dubious (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.markAsDubious({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `dubious_date` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### markAsUncollectible

`salesInvoices.markAsUncollectible`

Mark as uncollectible: this endpoint marks a sales invoice as uncollectible (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.markAsUncollectible({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `uncollectible_date` | `string` | No | — |
| `book_method` | `string` | No | Can be `revenue`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### notes.create

`salesInvoices.notes.create`

Adds note to entity: adds a note to the sales invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.notes.create({
	sales_invoice_id: '437485325512000001',
	note: { note: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `note` | `object` | No | — |

> [accordion] note full type
>
> ```ts theme={null}
> {
>   note?: string,
>   todo?: boolean | string,
>   assignee_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `entity_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `entity_type` | `string \| null` | No | — |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo` | `boolean \| string \| null \| null` | No | — |
| `note` | `string \| null \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `completed_by_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo_type` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

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

***

### notes.delete

`salesInvoices.notes.delete`

Destroys note from entity (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.salesInvoices.notes.delete({ sales_invoice_id: '437485325512000001', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### pause

`salesInvoices.pause`

Pause sales invoice: this endpoint pauses a sales invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.pause({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### payments.create

`salesInvoices.payments.create`

Create a payment: registers a payment for a sales invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.payments.create({
	sales_invoice_id: '437485325512000001',
	payment: { payment_date: '2026-04-09', price: '100.00' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `payment` | `object` | No | — |

> [accordion] payment full type
>
> ```ts theme={null}
> {
>   payment_date: string,
>   price: string | number | null,
>   price_base?: string | number | null,
>   financial_account_id?: string | number,
>   financial_mutation_id?: string | number,
>   transaction_identifier?: string,
>   manual_payment_action?: string,
>   ledger_account_id?: string | number,
>   invoice_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `invoice_type` | `string \| null` | No | — |
| `invoice_id` | `string \| number \| null` | No | A unique record identifier |
| `financial_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `payment_transaction_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `transaction_identifier` | `string \| null \| null` | No | — |
| `price` | `string \| number \| null \| null` | No | — |
| `price_base` | `string \| number \| null \| null` | No | — |
| `payment_date` | `string \| null` | No | — |
| `credit_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `financial_mutation_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `ledger_account_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `linked_payment_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `manual_payment_action` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### payments.delete

`salesInvoices.payments.delete`

Delete a payment: delete a payment from a sales invoice (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.salesInvoices.payments.delete({ sales_invoice_id: '437485325512000001', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `sales_invoice_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### registerCreditInvoicePayment

`salesInvoices.registerCreditInvoicePayment`

Register a payment for a creditinvoice: settles a credit invoice against the sales invoice it credits (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.registerCreditInvoicePayment({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### resume

`salesInvoices.resume`

Resume sales invoice: this endpoint resumes the sales invoice (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.resume({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### send

`salesInvoices.send`

Send the invoice to the customer now (email, Peppol, post or manual) or schedule it for a date; defaults come from the contact and workflow (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.salesInvoices.send({
	id: '437485325512000001',
	sales_invoice_sending: { delivery_method: 'Email', email_address: 'billing@example.com' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `sales_invoice_sending` | `object` | No | — |

> [accordion] sales\_invoice\_sending full type
>
> ```ts theme={null}
> {
>   delivery_method?: Email | Peppol | Manual,
>   sending_scheduled?: boolean | string,
>   deliver_ubl?: boolean | string,
>   mergeable?: boolean | string,
>   email_address?: string,
>   email_message?: string,
>   invoice_date?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### sendReminders

`salesInvoices.sendReminders`

Send payment reminders for overdue sales invoices to their contacts (sends real email) (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.salesInvoices.sendReminders({
	sales_invoice_reminders: [{
		contact_id: '387172987357643188',
		workflow_id: '458026356994737217',
		document_style_id: '458026356994737217',
		identity_id: '458026356994737217',
		sales_invoice_ids: ['437485325512000001'],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `sales_invoice_reminders` | `object[]` | Yes | — |

> [accordion] sales\_invoice\_reminders full type
>
> ```ts theme={null}
> {
>   contact_id: string | number,
>   workflow_id: string | number,
>   document_style_id: string | number,
>   identity_id: string | number,
>   sales_invoice_ids: (string | number)[],
>   reminder_text?: string,
>   delivery_method?: Email | Manual,
>   email_address?: string
> }[]
> ```

**Output:** `number`

***

### update

`salesInvoices.update`

Update a sales invoice: when updating a sales invoice, provide only the attributes you want to update (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.salesInvoices.update({
	id: '437485325512000001',
	sales_invoice: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `sales_invoice` | `object` | No | — |

> [accordion] sales\_invoice full type
>
> ```ts theme={null}
> {
>   contact_id?: string | number,
>   contact_person_id?: string | number,
>   update_contact?: boolean | string,
>   original_estimate_id?: string | number,
>   document_style_id?: string | number,
>   workflow_id?: string | number,
>   reference?: string,
>   invoice_sequence_id?: string | number,
>   remove_invoice_sequence_id?: boolean | string,
>   invoice_date?: string,
>   first_due_interval?: number,
>   currency?: string,
>   prices_are_incl_tax?: boolean | string,
>   payment_conditions?: string,
>   discount?: string | number | null,
>   time_entry_ids?: (string | number)[],
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[],
>   custom_fields_attributes?: Record<string, {
>     id: string | number,
>     value: string
>   }> | {
>     id?: string | number,
>     value?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

## Subscriptions

### additionalCharges.create

`subscriptions.additionalCharges.create`

Create an additional charge to be invoiced together with the subscription: at the end of the current subscription period, the additional charges are merged where possible and an invoice will be created for them (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.subscriptions.additionalCharges.create({
	id: '458026356994737217',
	product_id: '440009337465900001',
	amount: '121.00',
	period: '202604',
	description: 'Consulting April',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `product_id` | `string \| number` | Yes | A unique record identifier |
| `amount` | `string \| number` | Yes | The quantity on the invoice line, e.g. `1` or `5 x`. |
| `price` | `string \| number \| null` | No | An amount of money. Both a decimal and a string '10,95' are accepted. A string is bound to the same range as a number, -1,000,000,000 \<= *n* \<= 1,000,000,000. |
| `period` | `string` | Yes | The period the charge applies to, e.g. `20250101..20250131`, `202501..202503` or `this_month`. |
| `description` | `string` | Yes | — |
| `identifier` | `string` | No | Your own reference for this charge. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `product_id` | `string \| number \| null` | No | A unique record identifier |
| `detail_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `amount` | `string \| null \| null` | No | — |
| `price` | `string \| null` | No | — |
| `period` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |

***

### additionalCharges.list

`subscriptions.additionalCharges.list`

Get additional charges: get the additional charges of the given subscription (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.subscriptions.additionalCharges.list({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `include_billed` | `boolean \| string` | No | If true, includes the additional charges that have already been billed. Default is false. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   subscription_id?: string | number | null | null,
>   product_id?: string | number | null,
>   detail_id?: string | number | null | null,
>   amount?: string | null | null,
>   price?: string | null,
>   period?: string | null,
>   description?: string | null
> }[]
> ```

***

### create

`subscriptions.create`

Create a new subscription: starts a new subscription for the given contact (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.subscriptions.create({
	subscription: { start_date: '2026-04-09', product_id: '440009337465900001', contact_id: '387172987357643188' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `subscription` | `object` | Yes | — |

> [accordion] subscription full type
>
> ```ts theme={null}
> {
>   start_date: string,
>   product_id: string | number,
>   amount?: string,
>   discount?: string | number | null,
>   contact_id: string | number,
>   contact_person_id?: string | number,
>   end_date?: string,
>   reference?: string,
>   document_style_id?: string | number,
>   frequency?: number,
>   frequency_type?: day | week | month | quarter | year,
>   mergeable?: boolean | string,
>   prices_are_incl_tax?: boolean | string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `start_date` | `string \| null` | No | — |
| `end_date` | `string \| null \| null` | No | — |
| `frequency` | `number \| null \| null` | No | — |
| `frequency_type` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `cancelled_at` | `string \| null \| null` | No | — |
| `product_id` | `string \| number \| null` | No | A unique record identifier |
| `product` | `object \| null` | No | — |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `subscription_products` | `object[] \| null` | No | — |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |

> [accordion] product full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   description?: string | null | null,
>   title?: string | null | null,
>   identifier?: string | null | null,
>   price?: string | null,
>   currency?: string | null,
>   frequency?: number | null | null,
>   frequency_type?: string | null | null,
>   tax_rate_id?: string | number | null | null,
>   ledger_account_id?: string | number | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] subscription\_products full type
>
> ```ts theme={null}
> {
>   start_date?: string | null,
>   end_date?: string | null | null,
>   product_id?: string | number | null,
>   product?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     description?: string | null | null,
>     title?: string | null | null,
>     identifier?: string | null | null,
>     price?: string | null,
>     currency?: string | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     tax_rate_id?: string | number | null | null,
>     ledger_account_id?: string | number | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   } | null,
>   amount?: string | null,
>   discount?: string | null | null
> }[] | null
> ```

***

### createAndScheduleOneOffSalesInvoice

`subscriptions.createAndScheduleOneOffSalesInvoice`

Create and schedule an invoice to be sent together with the subscription: besides the recurring sales invoice for the subscription, you sometimes need to bill separate costs like usage based charges (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.subscriptions.createAndScheduleOneOffSalesInvoice({
	id: '458026356994737217',
	sales_invoice: { invoice_date: '2026-04-09' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `sales_invoice` | `object` | No | — |

> [accordion] sales\_invoice full type
>
> ```ts theme={null}
> {
>   details_attributes?: Record<string, {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }> | {
>     id?: string | number,
>     description?: string,
>     period?: string,
>     price?: string | number | null,
>     amount?: number | string,
>     tax_rate_id?: string | number,
>     ledger_account_id?: string | number,
>     project_id?: string | number,
>     product_id?: string | number,
>     row_order?: number | string,
>     is_optional?: boolean | string,
>     is_selected?: boolean | string,
>     _destroy?: boolean | string,
>     automated_tax_enabled?: boolean | string
>   }[],
>   invoice_date?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `invoice_id` | `string \| null \| null` | No | The invoice number. It is `null` while the invoice is a draft. |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `subscription_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `workflow_id` | `string \| number \| null` | No | A unique record identifier |
| `document_style_id` | `string \| number \| null` | No | A unique record identifier |
| `identity_id` | `string \| number \| null` | No | A unique record identifier |
| `draft_id` | `number \| null \| null` | No | Sequence number a draft is referred to by while it has no invoice number yet. |
| `state` | `string \| null` | No | — |
| `invoice_date` | `string \| null \| null` | No | The date of the record itself. It does not say which periods the amounts belong to, because a detail can carry its own `period` and a record dated in one month can cover another. Read `details[].period` for the periods; only a detail without a period of its own lands on this date. |
| `due_date` | `string \| null` | No | — |
| `payment_conditions` | `string \| null \| null` | No | — |
| `payment_reference` | `string \| null \| null` | No | — |
| `short_payment_reference` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `language` | `string \| null \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `discount` | `string \| null \| null` | No | — |
| `original_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `paused` | `boolean \| null` | No | — |
| `paid_at` | `string \| null \| null` | No | — |
| `sent_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_view_code` | `string \| null \| null` | No | — |
| `public_view_code_expires_at` | `string \| null \| null` | No | — |
| `version` | `number \| null` | No | — |
| `details` | `object[] \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `total_paid` | `string \| null` | No | — |
| `total_unpaid` | `string \| null` | No | — |
| `total_unpaid_base` | `string \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `total_price_excl_tax` | `string \| null` | No | — |
| `total_price_excl_tax_base` | `string \| null` | No | — |
| `total_price_incl_tax` | `string \| null` | No | — |
| `total_price_incl_tax_base` | `string \| null` | No | — |
| `total_discount` | `string \| null` | No | — |
| `marked_dubious_on` | `string \| null \| null` | No | — |
| `marked_uncollectible_on` | `string \| null \| null` | No | — |
| `reminder_count` | `number \| null \| null` | No | — |
| `next_reminder` | `string \| null \| null` | No | — |
| `original_estimate_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `payment_url` | `string \| null` | No | — |
| `custom_fields` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `tax_totals` | `object[] \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   tax_rate_id?: string | number | null,
>   ledger_account_id?: string | number | null,
>   project_id?: string | number | null | null,
>   product_id?: string | number | null | null,
>   amount?: string | null | null,
>   amount_decimal?: string | null | null,
>   description?: string | null,
>   price?: string | null,
>   period?: string | null | null,
>   row_order?: number | null,
>   total_price_excl_tax_with_discount?: string | number | null | null,
>   total_price_excl_tax_with_discount_base?: string | number | null | null,
>   tax_report_reference?: (string | null)[] | null,
>   mandatory_tax_text?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   is_optional?: boolean | null,
>   is_selected?: boolean | null
> }[] | null
> ```

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   invoice_type?: string | null,
>   invoice_id?: string | number | null,
>   financial_account_id?: string | number | null | null,
>   user_id?: string | number | null,
>   payment_transaction_id?: string | number | null | null,
>   transaction_identifier?: string | null | null,
>   price?: string | number | null | null,
>   price_base?: string | number | null | null,
>   payment_date?: string | null,
>   credit_invoice_id?: string | number | null | null,
>   financial_mutation_id?: string | number | null | null,
>   ledger_account_id?: string | number | null | null,
>   linked_payment_id?: string | number | null | null,
>   manual_payment_action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   attachable_id?: string | number | null,
>   attachable_type?: string | null,
>   filename?: string | null,
>   content_type?: string | null,
>   size?: number | null,
>   rotation?: number | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] tax\_totals full type
>
> ```ts theme={null}
> {
>   tax_rate_id?: string | number | null,
>   taxable_amount?: string | number | null | null,
>   taxable_amount_base?: string | number | null | null,
>   tax_amount?: string | number | null | null,
>   tax_amount_base?: string | number | null | null
> }[] | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null,
>   description?: string | null | null,
>   paused_duration?: number | null,
>   billable?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### delete

`subscriptions.delete`

Cancel a subscription: cancels the subscription (scope: sales\_invoices)

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

```ts theme={null}
await corsair.moneybird.api.subscriptions.delete({
	id: '458026356994737217',
	subscription: { end_date: '2026-04-09' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `subscription` | `object` | No | — |

> [accordion] subscription full type
>
> ```ts theme={null}
> {
>   end_date?: string
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   start_date?: string | null,
>   end_date?: string | null | null,
>   frequency?: number | null | null,
>   frequency_type?: string | null | null,
>   reference?: string | null | null,
>   cancelled_at?: string | null | null,
>   product_id?: string | number | null,
>   product?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     description?: string | null | null,
>     title?: string | null | null,
>     identifier?: string | null | null,
>     price?: string | null,
>     currency?: string | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     tax_rate_id?: string | number | null | null,
>     ledger_account_id?: string | number | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   } | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   subscription_products?: {
>     start_date?: string | null,
>     end_date?: string | null | null,
>     product_id?: string | number | null,
>     product?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       description?: string | null | null,
>       title?: string | null | null,
>       identifier?: string | null | null,
>       price?: string | null,
>       currency?: string | null,
>       frequency?: number | null | null,
>       frequency_type?: string | null | null,
>       tax_rate_id?: string | number | null | null,
>       ledger_account_id?: string | number | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | null,
>     amount?: string | null,
>     discount?: string | null | null
>   }[] | null,
>   recurring_sales_invoice_id?: string | number | null | null
> } | {
>   success: true
> }
> ```

***

### get

`subscriptions.get`

Get subscription: get a subscription (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.subscriptions.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `start_date` | `string \| null` | No | — |
| `end_date` | `string \| null \| null` | No | — |
| `frequency` | `number \| null \| null` | No | — |
| `frequency_type` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `cancelled_at` | `string \| null \| null` | No | — |
| `product_id` | `string \| number \| null` | No | A unique record identifier |
| `product` | `object \| null` | No | — |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `subscription_products` | `object[] \| null` | No | — |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |

> [accordion] product full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   description?: string | null | null,
>   title?: string | null | null,
>   identifier?: string | null | null,
>   price?: string | null,
>   currency?: string | null,
>   frequency?: number | null | null,
>   frequency_type?: string | null | null,
>   tax_rate_id?: string | number | null | null,
>   ledger_account_id?: string | number | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] subscription\_products full type
>
> ```ts theme={null}
> {
>   start_date?: string | null,
>   end_date?: string | null | null,
>   product_id?: string | number | null,
>   product?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     description?: string | null | null,
>     title?: string | null | null,
>     identifier?: string | null | null,
>     price?: string | null,
>     currency?: string | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     tax_rate_id?: string | number | null | null,
>     ledger_account_id?: string | number | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   } | null,
>   amount?: string | null,
>   discount?: string | null | null
> }[] | null
> ```

***

### list

`subscriptions.list`

List subscriptions of a contact: lists the subscriptions of a single contact (scope: sales\_invoices)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.subscriptions.list({ contact_id: '387172987357643188' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `contact_id` | `string \| number` | Yes | A unique record identifier |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   start_date?: string | null,
>   end_date?: string | null | null,
>   frequency?: number | null | null,
>   frequency_type?: string | null | null,
>   reference?: string | null | null,
>   cancelled_at?: string | null | null,
>   product_id?: string | number | null,
>   product?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     description?: string | null | null,
>     title?: string | null | null,
>     identifier?: string | null | null,
>     price?: string | null,
>     currency?: string | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     tax_rate_id?: string | number | null | null,
>     ledger_account_id?: string | number | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   } | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   subscription_products?: {
>     start_date?: string | null,
>     end_date?: string | null | null,
>     product_id?: string | number | null,
>     product?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       description?: string | null | null,
>       title?: string | null | null,
>       identifier?: string | null | null,
>       price?: string | null,
>       currency?: string | null,
>       frequency?: number | null | null,
>       frequency_type?: string | null | null,
>       tax_rate_id?: string | number | null | null,
>       ledger_account_id?: string | number | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | null,
>     amount?: string | null,
>     discount?: string | null | null
>   }[] | null,
>   recurring_sales_invoice_id?: string | number | null | null
> }[]
> ```

***

### update

`subscriptions.update`

Update a subscription (scope: sales\_invoices)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.subscriptions.update({
	id: '458026356994737217',
	subscription: { reference: 'PO-42' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `subscription` | `object` | No | — |

> [accordion] subscription full type
>
> ```ts theme={null}
> {
>   contact_person_id?: string | number | null,
>   document_style_id?: string | number,
>   reference?: string,
>   mergeable?: boolean | string,
>   prices_are_incl_tax?: boolean | string,
>   product_id?: string | number,
>   start_date?: string,
>   amount?: string,
>   discount?: string | number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `start_date` | `string \| null` | No | — |
| `end_date` | `string \| null \| null` | No | — |
| `frequency` | `number \| null \| null` | No | — |
| `frequency_type` | `string \| null \| null` | No | — |
| `reference` | `string \| null \| null` | No | — |
| `cancelled_at` | `string \| null \| null` | No | — |
| `product_id` | `string \| number \| null` | No | A unique record identifier |
| `product` | `object \| null` | No | — |
| `contact_id` | `string \| number \| null` | No | A unique record identifier |
| `contact` | `object \| null` | No | — |
| `contact_person_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `contact_person` | `object \| null` | No | — |
| `subscription_products` | `object[] \| null` | No | — |
| `recurring_sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |

> [accordion] product full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   description?: string | null | null,
>   title?: string | null | null,
>   identifier?: string | null | null,
>   price?: string | null,
>   currency?: string | null,
>   frequency?: number | null | null,
>   frequency_type?: string | null | null,
>   tax_rate_id?: string | number | null | null,
>   ledger_account_id?: string | number | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   company_name?: string | null | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   address1?: string | null | null,
>   address2?: string | null | null,
>   zipcode?: string | null | null,
>   city?: string | null | null,
>   country?: string | null,
>   phone?: string | null | null,
>   delivery_method?: string | null | null,
>   customer_id?: string | null,
>   tax_number?: string | null | null,
>   chamber_of_commerce?: string | null | null,
>   bank_account?: string | null | null,
>   is_trusted?: boolean | null,
>   max_transfer_amount?: string | null | null,
>   attention?: string | null | null,
>   email?: string | null | null,
>   email_ubl?: boolean | null,
>   send_invoices_to_attention?: string | null | null,
>   send_invoices_to_email?: string | null | null,
>   send_estimates_to_attention?: string | null | null,
>   send_estimates_to_email?: string | null | null,
>   send_reminders_to_attention?: string | null | null,
>   send_reminders_to_email?: string | null | null,
>   direct_debit?: boolean | null,
>   sepa_active?: boolean | null | null,
>   sepa_iban?: string | null | null,
>   sepa_iban_account_name?: string | null | null,
>   sepa_bic?: string | null | null,
>   sepa_mandate_id?: string | null | null,
>   sepa_mandate_date?: string | null | null,
>   sepa_sequence_type?: string | null,
>   credit_card_number?: string | null | null,
>   credit_card_reference?: string | null | null,
>   credit_card_type?: string | null | null,
>   tax_number_validated_at?: string | null | null,
>   tax_number_valid?: boolean | null | null,
>   invoice_workflow_id?: string | number | null | null,
>   estimate_workflow_id?: string | number | null | null,
>   si_identifier?: string | null | null,
>   si_identifier_type?: string | null | null,
>   moneybird_payments_mandate?: boolean | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null,
>   sales_invoices_url?: string | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   contact_people?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   }[] | null,
>   archived?: boolean | null
> } | null
> ```

> [accordion] contact\_person full type
>
> ```ts theme={null}
> {
>   id?: string | number | null | null,
>   contact_id?: string | number | null | null,
>   administration_id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   phone?: string | null | null,
>   email?: string | null | null,
>   department?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null,
>   version?: number | null
> } | null | null
> ```

> [accordion] subscription\_products full type
>
> ```ts theme={null}
> {
>   start_date?: string | null,
>   end_date?: string | null | null,
>   product_id?: string | number | null,
>   product?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     description?: string | null | null,
>     title?: string | null | null,
>     identifier?: string | null | null,
>     price?: string | null,
>     currency?: string | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     tax_rate_id?: string | number | null | null,
>     ledger_account_id?: string | number | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   } | null,
>   amount?: string | null,
>   discount?: string | null | null
> }[] | null
> ```

***

## Subscription Templates

### createSalesLink

`subscriptionTemplates.createSalesLink`

Create online sales link: this call generates an online sales link, and allows pre-setting the contact and start date for a subscription (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.subscriptionTemplates.createSalesLink({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `contact_id` | `string \| number` | No | A unique record identifier |
| `start_date` | `string` | No | — |
| `product_id` | `string \| number` | No | A unique record identifier |

**Output:** `string`

***

### list

`subscriptionTemplates.list`

List all subscription templates: this call retrieves a paginated list of all subscription templates available in the administration, one page at a time (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.subscriptionTemplates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `per_page` | `number \| string` | No | — |
| `page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   workflow_id?: string | number | null,
>   document_style_id?: string | number | null,
>   mergeable?: boolean | null,
>   contact_can_update?: boolean | null,
>   products?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     description?: string | null | null,
>     title?: string | null | null,
>     identifier?: string | null | null,
>     price?: string | null,
>     currency?: string | null,
>     frequency?: number | null | null,
>     frequency_type?: string | null | null,
>     tax_rate_id?: string | number | null | null,
>     ledger_account_id?: string | number | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

## Task List Groups

### delete

`taskListGroups.delete`

Deletes a task list group: permanently deletes a task list group and all its tasks (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

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

```ts theme={null}
await corsair.moneybird.api.taskListGroups.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### get

`taskListGroups.get`

Returns information about a task list group (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.taskListGroups.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null \| null` | No | — |
| `row_order` | `number \| null` | No | — |
| `report_type` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `tasks` | `object[] \| null` | No | — |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   row_order?: number | null,
>   completed_at?: string | null | null,
>   report_type?: string | null | null,
>   task_lists_group_id?: string | number | null | null,
>   parent_task_id?: string | number | null | null,
>   assignee_id?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   subtasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: (recursive)[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[] | null
> ```

***

### tasks.create

`taskListGroups.tasks.create`

Creates a new task in a group (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskListGroups.tasks.create({
	task_list_group_id: '458026356994737217',
	task: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `task_list_group_id` | `string \| number` | Yes | A unique record identifier |
| `task` | `object` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   name: string,
>   description?: string,
>   report_type?: balance_sheet | profit_loss | debtor | creditor | assets,
>   assignee_id?: string | number,
>   related_entity_id?: string | number | null,
>   generate_subtasks?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `row_order` | `number \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `report_type` | `string \| null \| null` | No | — |
| `task_lists_group_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `parent_task_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `subtasks` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] subtasks full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   row_order?: number | null,
>   completed_at?: string | null | null,
>   report_type?: string | null | null,
>   task_lists_group_id?: string | number | null | null,
>   parent_task_id?: string | number | null | null,
>   assignee_id?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   subtasks?: (recursive)[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### update

`taskListGroups.update`

Updates a task list group (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskListGroups.update({
	id: '458026356994737217',
	group: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `group` | `object` | No | — |

> [accordion] group full type
>
> ```ts theme={null}
> {
>   name?: string,
>   report_type?: balance_sheet | profit_loss | debtor | creditor | assets
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null \| null` | No | — |
| `row_order` | `number \| null` | No | — |
| `report_type` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `tasks` | `object[] \| null` | No | — |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   row_order?: number | null,
>   completed_at?: string | null | null,
>   report_type?: string | null | null,
>   task_lists_group_id?: string | number | null | null,
>   parent_task_id?: string | number | null | null,
>   assignee_id?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   subtasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: (recursive)[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[] | null
> ```

***

## Task Lists

### create

`taskLists.create`

Creates a new task list (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskLists.create({
	task_list: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `task_list` | `object` | No | — |

> [accordion] task\_list full type
>
> ```ts theme={null}
> {
>   name: string,
>   description?: string,
>   deadline_on?: string,
>   period_begin?: string,
>   period_end?: string,
>   template_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `deadline_on` | `string \| null \| null` | No | — |
| `period_begin` | `string \| null \| null` | No | — |
| `period_end` | `string \| null \| null` | No | — |
| `completed` | `boolean \| null` | No | — |
| `template_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `total_tasks_count` | `number \| null` | No | — |
| `completed_tasks_count` | `number \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `groups` | `object[] \| null` | No | — |

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null | null,
>   row_order?: number | null,
>   report_type?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   tasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       name?: string | null,
>       description?: string | null | null,
>       row_order?: number | null,
>       completed_at?: string | null | null,
>       report_type?: string | null | null,
>       task_lists_group_id?: string | number | null | null,
>       parent_task_id?: string | number | null | null,
>       assignee_id?: string | number | null | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       subtasks?: (recursive)[] | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       events?: {
>         id?: string | number | null,
>         administration_id?: string | number | null | null,
>         user_id?: string | number | null,
>         action?: string | null,
>         entity_type?: string | null,
>         entity_id?: string | number | null | null,
>         link_entity_id?: string | number | null | null,
>         link_entity_type?: string | null | null,
>         data?: {
>         } | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null
>     }[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null
> }[] | null
> ```

***

### delete

`taskLists.delete`

Deletes a task list: permanently deletes a task list and all its groups and tasks (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

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

```ts theme={null}
await corsair.moneybird.api.taskLists.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### get

`taskLists.get`

Returns information about a task list (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.taskLists.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `deadline_on` | `string \| null \| null` | No | — |
| `period_begin` | `string \| null \| null` | No | — |
| `period_end` | `string \| null \| null` | No | — |
| `completed` | `boolean \| null` | No | — |
| `template_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `total_tasks_count` | `number \| null` | No | — |
| `completed_tasks_count` | `number \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `groups` | `object[] \| null` | No | — |

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null | null,
>   row_order?: number | null,
>   report_type?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   tasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       name?: string | null,
>       description?: string | null | null,
>       row_order?: number | null,
>       completed_at?: string | null | null,
>       report_type?: string | null | null,
>       task_lists_group_id?: string | number | null | null,
>       parent_task_id?: string | number | null | null,
>       assignee_id?: string | number | null | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       subtasks?: (recursive)[] | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       events?: {
>         id?: string | number | null,
>         administration_id?: string | number | null | null,
>         user_id?: string | number | null,
>         action?: string | null,
>         entity_type?: string | null,
>         entity_id?: string | number | null | null,
>         link_entity_id?: string | number | null | null,
>         link_entity_type?: string | null | null,
>         data?: {
>         } | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null
>     }[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null
> }[] | null
> ```

***

### groups.create

`taskLists.groups.create`

Creates a new group in a task list (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskLists.groups.create({
	task_list_id: '458026356994737217',
	group: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `task_list_id` | `string \| number` | Yes | A unique record identifier |
| `group` | `object` | No | — |

> [accordion] group full type
>
> ```ts theme={null}
> {
>   name: string,
>   report_type?: balance_sheet | profit_loss | debtor | creditor | assets
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null \| null` | No | — |
| `row_order` | `number \| null` | No | — |
| `report_type` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `tasks` | `object[] \| null` | No | — |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   row_order?: number | null,
>   completed_at?: string | null | null,
>   report_type?: string | null | null,
>   task_lists_group_id?: string | number | null | null,
>   parent_task_id?: string | number | null | null,
>   assignee_id?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   subtasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: (recursive)[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[] | null
> ```

***

### list

`taskLists.list`

List all task lists of an administration, one page at a time (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.taskLists.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `per_page` | `number \| string` | No | — |
| `page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   deadline_on?: string | null | null,
>   period_begin?: string | null | null,
>   period_end?: string | null | null,
>   completed?: boolean | null,
>   template_id?: string | number | null | null,
>   total_tasks_count?: number | null,
>   completed_tasks_count?: number | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   groups?: {
>     id?: string | number | null,
>     name?: string | null | null,
>     row_order?: number | null,
>     report_type?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     tasks?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       name?: string | null,
>       description?: string | null | null,
>       row_order?: number | null,
>       completed_at?: string | null | null,
>       report_type?: string | null | null,
>       task_lists_group_id?: string | number | null | null,
>       parent_task_id?: string | number | null | null,
>       assignee_id?: string | number | null | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       subtasks?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         name?: string | null,
>         description?: string | null | null,
>         row_order?: number | null,
>         completed_at?: string | null | null,
>         report_type?: string | null | null,
>         task_lists_group_id?: string | number | null | null,
>         parent_task_id?: string | number | null | null,
>         assignee_id?: string | number | null | null,
>         created_at?: string | null,
>         updated_at?: string | null,
>         subtasks?: (recursive)[] | null,
>         notes?: {
>           id?: string | number | null,
>           administration_id?: string | number | null,
>           entity_id?: string | number | null | null,
>           entity_type?: string | null,
>           user_id?: string | number | null,
>           assignee_id?: string | number | null | null,
>           todo?: boolean | string | null | null,
>           note?: string | null | null,
>           completed_at?: string | null | null,
>           completed_by_id?: string | number | null | null,
>           todo_type?: string | null | null,
>           data?: {
>           } | null | null,
>           created_at?: string | null,
>           updated_at?: string | null
>         }[] | null,
>         events?: {
>           id?: string | number | null,
>           administration_id?: string | number | null | null,
>           user_id?: string | number | null,
>           action?: string | null,
>           entity_type?: string | null,
>           entity_id?: string | number | null | null,
>           link_entity_id?: string | number | null | null,
>           link_entity_type?: string | null | null,
>           data?: {
>           } | null,
>           created_at?: string | null,
>           updated_at?: string | null
>         }[] | null
>       }[] | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       events?: {
>         id?: string | number | null,
>         administration_id?: string | number | null | null,
>         user_id?: string | number | null,
>         action?: string | null,
>         entity_type?: string | null,
>         entity_id?: string | number | null | null,
>         link_entity_id?: string | number | null | null,
>         link_entity_type?: string | null | null,
>         data?: {
>         } | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null
>     }[] | null
>   }[] | null
> }[]
> ```

***

### update

`taskLists.update`

Updates a task list (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskLists.update({
	id: '458026356994737217',
	task_list: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `task_list` | `object` | No | — |

> [accordion] task\_list full type
>
> ```ts theme={null}
> {
>   name?: string,
>   description?: string,
>   deadline_on?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `deadline_on` | `string \| null \| null` | No | — |
| `period_begin` | `string \| null \| null` | No | — |
| `period_end` | `string \| null \| null` | No | — |
| `completed` | `boolean \| null` | No | — |
| `template_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `total_tasks_count` | `number \| null` | No | — |
| `completed_tasks_count` | `number \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `groups` | `object[] \| null` | No | — |

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null | null,
>   row_order?: number | null,
>   report_type?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   tasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       name?: string | null,
>       description?: string | null | null,
>       row_order?: number | null,
>       completed_at?: string | null | null,
>       report_type?: string | null | null,
>       task_lists_group_id?: string | number | null | null,
>       parent_task_id?: string | number | null | null,
>       assignee_id?: string | number | null | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       subtasks?: (recursive)[] | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       events?: {
>         id?: string | number | null,
>         administration_id?: string | number | null | null,
>         user_id?: string | number | null,
>         action?: string | null,
>         entity_type?: string | null,
>         entity_id?: string | number | null | null,
>         link_entity_id?: string | number | null | null,
>         link_entity_type?: string | null | null,
>         data?: {
>         } | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null
>     }[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null
> }[] | null
> ```

***

## Task List Tasks

### assign

`taskListTasks.assign`

Assigns a user to a task: assigns a user to the specified task (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskListTasks.assign({ task_list_task_id: '444001234567000001', assignee_id: '445001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `task_list_task_id` | `string \| number` | Yes | A unique record identifier |
| `assignee_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `row_order` | `number \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `report_type` | `string \| null \| null` | No | — |
| `task_lists_group_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `parent_task_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `subtasks` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] subtasks full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   row_order?: number | null,
>   completed_at?: string | null | null,
>   report_type?: string | null | null,
>   task_lists_group_id?: string | number | null | null,
>   parent_task_id?: string | number | null | null,
>   assignee_id?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   subtasks?: (recursive)[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### complete

`taskListTasks.complete`

Completes a task: marks a task and all its subtasks as completed (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskListTasks.complete({ task_list_task_id: '444001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `task_list_task_id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `row_order` | `number \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `report_type` | `string \| null \| null` | No | — |
| `task_lists_group_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `parent_task_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `subtasks` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] subtasks full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   row_order?: number | null,
>   completed_at?: string | null | null,
>   report_type?: string | null | null,
>   task_lists_group_id?: string | number | null | null,
>   parent_task_id?: string | number | null | null,
>   assignee_id?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   subtasks?: (recursive)[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### delete

`taskListTasks.delete`

Deletes a task: permanently deletes a task and all its subtasks (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

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

```ts theme={null}
await corsair.moneybird.api.taskListTasks.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### get

`taskListTasks.get`

Returns information about a task (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.taskListTasks.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `row_order` | `number \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `report_type` | `string \| null \| null` | No | — |
| `task_lists_group_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `parent_task_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `subtasks` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] subtasks full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   row_order?: number | null,
>   completed_at?: string | null | null,
>   report_type?: string | null | null,
>   task_lists_group_id?: string | number | null | null,
>   parent_task_id?: string | number | null | null,
>   assignee_id?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   subtasks?: (recursive)[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### notes.create

`taskListTasks.notes.create`

Creates a note on a task (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskListTasks.notes.create({
	task_list_task_id: '444001234567000001',
	note: { note: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `task_list_task_id` | `string \| number` | Yes | A unique record identifier |
| `note` | `object` | No | — |

> [accordion] note full type
>
> ```ts theme={null}
> {
>   note: string,
>   todo?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `entity_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `entity_type` | `string \| null` | No | — |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo` | `boolean \| string \| null \| null` | No | — |
| `note` | `string \| null \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `completed_by_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo_type` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

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

***

### reopen

`taskListTasks.reopen`

Reopens a task: reopens a completed task and possible parent tasks (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

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

```ts theme={null}
await corsair.moneybird.api.taskListTasks.reopen({ task_list_task_id: '444001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `task_list_task_id` | `string \| number` | Yes | A unique record identifier |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   row_order?: number | null,
>   completed_at?: string | null | null,
>   report_type?: string | null | null,
>   task_lists_group_id?: string | number | null | null,
>   parent_task_id?: string | number | null | null,
>   assignee_id?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   subtasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: (recursive)[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### unassign

`taskListTasks.unassign`

Unassigns the user from a task: removes the current assignment from the specified task (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

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

```ts theme={null}
await corsair.moneybird.api.taskListTasks.unassign({ task_list_task_id: '444001234567000001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `task_list_task_id` | `string \| number` | Yes | A unique record identifier |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   row_order?: number | null,
>   completed_at?: string | null | null,
>   report_type?: string | null | null,
>   task_lists_group_id?: string | number | null | null,
>   parent_task_id?: string | number | null | null,
>   assignee_id?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   subtasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: (recursive)[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`taskListTasks.update`

Updates a task (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskListTasks.update({
	id: '458026356994737217',
	task: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `task` | `object` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   name?: string,
>   description?: string,
>   report_type?: balance_sheet | profit_loss | debtor | creditor | assets,
>   assignee_id?: string | number,
>   related_entity_id?: string | number | null,
>   generate_subtasks?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `row_order` | `number \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `report_type` | `string \| null \| null` | No | — |
| `task_lists_group_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `parent_task_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `subtasks` | `object[] \| null` | No | — |
| `notes` | `object[] \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |

> [accordion] subtasks full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   row_order?: number | null,
>   completed_at?: string | null | null,
>   report_type?: string | null | null,
>   task_lists_group_id?: string | number | null | null,
>   parent_task_id?: string | number | null | null,
>   assignee_id?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   subtasks?: (recursive)[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

## Task List Templates

### create

`taskListTemplates.create`

Creates a new task list template (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskListTemplates.create({
	task_list_template: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `task_list_template` | `object` | No | — |

> [accordion] task\_list\_template full type
>
> ```ts theme={null}
> {
>   name: string,
>   description?: string,
>   period?: string,
>   deadline_after?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `period` | `string \| null \| null` | No | ISO 8601 duration string (e.g. "P1M" for one month, "P3M" for one quarter, "P1Y" for one year) |
| `deadline_after` | `string \| null \| null` | No | ISO 8601 duration string representing the deadline offset from the period end |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `groups` | `object[] \| null` | No | — |

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null | null,
>   row_order?: number | null,
>   report_type?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   tasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       name?: string | null,
>       description?: string | null | null,
>       row_order?: number | null,
>       completed_at?: string | null | null,
>       report_type?: string | null | null,
>       task_lists_group_id?: string | number | null | null,
>       parent_task_id?: string | number | null | null,
>       assignee_id?: string | number | null | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       subtasks?: (recursive)[] | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       events?: {
>         id?: string | number | null,
>         administration_id?: string | number | null | null,
>         user_id?: string | number | null,
>         action?: string | null,
>         entity_type?: string | null,
>         entity_id?: string | number | null | null,
>         link_entity_id?: string | number | null | null,
>         link_entity_type?: string | null | null,
>         data?: {
>         } | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null
>     }[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null
> }[] | null
> ```

***

### createTaskList

`taskListTemplates.createTaskList`

Creates a task list from a template (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskListTemplates.createTaskList({
	task_list_template_id: '458026356994737217',
	task_list: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `task_list_template_id` | `string \| number` | Yes | A unique record identifier |
| `task_list` | `object` | No | — |

> [accordion] task\_list full type
>
> ```ts theme={null}
> {
>   name?: string,
>   description?: string,
>   deadline_on?: string,
>   period_begin?: string,
>   period_end?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `deadline_on` | `string \| null \| null` | No | — |
| `period_begin` | `string \| null \| null` | No | — |
| `period_end` | `string \| null \| null` | No | — |
| `completed` | `boolean \| null` | No | — |
| `template_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `total_tasks_count` | `number \| null` | No | — |
| `completed_tasks_count` | `number \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `groups` | `object[] \| null` | No | — |

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null | null,
>   row_order?: number | null,
>   report_type?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   tasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       name?: string | null,
>       description?: string | null | null,
>       row_order?: number | null,
>       completed_at?: string | null | null,
>       report_type?: string | null | null,
>       task_lists_group_id?: string | number | null | null,
>       parent_task_id?: string | number | null | null,
>       assignee_id?: string | number | null | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       subtasks?: (recursive)[] | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       events?: {
>         id?: string | number | null,
>         administration_id?: string | number | null | null,
>         user_id?: string | number | null,
>         action?: string | null,
>         entity_type?: string | null,
>         entity_id?: string | number | null | null,
>         link_entity_id?: string | number | null | null,
>         link_entity_type?: string | null | null,
>         data?: {
>         } | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null
>     }[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null
> }[] | null
> ```

***

### delete

`taskListTemplates.delete`

Deletes a task list template: permanently deletes a task list template and all its groups and tasks (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

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

```ts theme={null}
await corsair.moneybird.api.taskListTemplates.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### get

`taskListTemplates.get`

Returns information about a task list template (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.taskListTemplates.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `period` | `string \| null \| null` | No | ISO 8601 duration string (e.g. "P1M" for one month, "P3M" for one quarter, "P1Y" for one year) |
| `deadline_after` | `string \| null \| null` | No | ISO 8601 duration string representing the deadline offset from the period end |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `groups` | `object[] \| null` | No | — |

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null | null,
>   row_order?: number | null,
>   report_type?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   tasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       name?: string | null,
>       description?: string | null | null,
>       row_order?: number | null,
>       completed_at?: string | null | null,
>       report_type?: string | null | null,
>       task_lists_group_id?: string | number | null | null,
>       parent_task_id?: string | number | null | null,
>       assignee_id?: string | number | null | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       subtasks?: (recursive)[] | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       events?: {
>         id?: string | number | null,
>         administration_id?: string | number | null | null,
>         user_id?: string | number | null,
>         action?: string | null,
>         entity_type?: string | null,
>         entity_id?: string | number | null | null,
>         link_entity_id?: string | number | null | null,
>         link_entity_type?: string | null | null,
>         data?: {
>         } | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null
>     }[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null
> }[] | null
> ```

***

### groups.create

`taskListTemplates.groups.create`

Creates a new group in a task list template (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskListTemplates.groups.create({
	task_list_template_id: '458026356994737217',
	group: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `task_list_template_id` | `string \| number` | Yes | A unique record identifier |
| `group` | `object` | No | — |

> [accordion] group full type
>
> ```ts theme={null}
> {
>   name: string,
>   report_type?: balance_sheet | profit_loss | debtor | creditor | assets
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null \| null` | No | — |
| `row_order` | `number \| null` | No | — |
| `report_type` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `tasks` | `object[] \| null` | No | — |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   row_order?: number | null,
>   completed_at?: string | null | null,
>   report_type?: string | null | null,
>   task_lists_group_id?: string | number | null | null,
>   parent_task_id?: string | number | null | null,
>   assignee_id?: string | number | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   subtasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: (recursive)[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[] | null
> ```

***

### list

`taskListTemplates.list`

List all task list templates of an administration (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.taskListTemplates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   description?: string | null | null,
>   period?: string | null | null,
>   deadline_after?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   groups?: {
>     id?: string | number | null,
>     name?: string | null | null,
>     row_order?: number | null,
>     report_type?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     tasks?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       name?: string | null,
>       description?: string | null | null,
>       row_order?: number | null,
>       completed_at?: string | null | null,
>       report_type?: string | null | null,
>       task_lists_group_id?: string | number | null | null,
>       parent_task_id?: string | number | null | null,
>       assignee_id?: string | number | null | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       subtasks?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         name?: string | null,
>         description?: string | null | null,
>         row_order?: number | null,
>         completed_at?: string | null | null,
>         report_type?: string | null | null,
>         task_lists_group_id?: string | number | null | null,
>         parent_task_id?: string | number | null | null,
>         assignee_id?: string | number | null | null,
>         created_at?: string | null,
>         updated_at?: string | null,
>         subtasks?: (recursive)[] | null,
>         notes?: {
>           id?: string | number | null,
>           administration_id?: string | number | null,
>           entity_id?: string | number | null | null,
>           entity_type?: string | null,
>           user_id?: string | number | null,
>           assignee_id?: string | number | null | null,
>           todo?: boolean | string | null | null,
>           note?: string | null | null,
>           completed_at?: string | null | null,
>           completed_by_id?: string | number | null | null,
>           todo_type?: string | null | null,
>           data?: {
>           } | null | null,
>           created_at?: string | null,
>           updated_at?: string | null
>         }[] | null,
>         events?: {
>           id?: string | number | null,
>           administration_id?: string | number | null | null,
>           user_id?: string | number | null,
>           action?: string | null,
>           entity_type?: string | null,
>           entity_id?: string | number | null | null,
>           link_entity_id?: string | number | null | null,
>           link_entity_type?: string | null | null,
>           data?: {
>           } | null,
>           created_at?: string | null,
>           updated_at?: string | null
>         }[] | null
>       }[] | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       events?: {
>         id?: string | number | null,
>         administration_id?: string | number | null | null,
>         user_id?: string | number | null,
>         action?: string | null,
>         entity_type?: string | null,
>         entity_id?: string | number | null | null,
>         link_entity_id?: string | number | null | null,
>         link_entity_type?: string | null | null,
>         data?: {
>         } | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null
>     }[] | null
>   }[] | null
> }[]
> ```

***

### update

`taskListTemplates.update`

Updates a task list template (scopes: bank, documents, estimates, sales\_invoices, settings and time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.taskListTemplates.update({
	id: '458026356994737217',
	task_list_template: { name: 'Website Relaunch' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `task_list_template` | `object` | No | — |

> [accordion] task\_list\_template full type
>
> ```ts theme={null}
> {
>   name?: string,
>   description?: string,
>   period?: string,
>   deadline_after?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `period` | `string \| null \| null` | No | ISO 8601 duration string (e.g. "P1M" for one month, "P3M" for one quarter, "P1Y" for one year) |
| `deadline_after` | `string \| null \| null` | No | ISO 8601 duration string representing the deadline offset from the period end |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `groups` | `object[] \| null` | No | — |

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null | null,
>   row_order?: number | null,
>   report_type?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   tasks?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     name?: string | null,
>     description?: string | null | null,
>     row_order?: number | null,
>     completed_at?: string | null | null,
>     report_type?: string | null | null,
>     task_lists_group_id?: string | number | null | null,
>     parent_task_id?: string | number | null | null,
>     assignee_id?: string | number | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     subtasks?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       name?: string | null,
>       description?: string | null | null,
>       row_order?: number | null,
>       completed_at?: string | null | null,
>       report_type?: string | null | null,
>       task_lists_group_id?: string | number | null | null,
>       parent_task_id?: string | number | null | null,
>       assignee_id?: string | number | null | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       subtasks?: (recursive)[] | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       events?: {
>         id?: string | number | null,
>         administration_id?: string | number | null | null,
>         user_id?: string | number | null,
>         action?: string | null,
>         entity_type?: string | null,
>         entity_id?: string | number | null | null,
>         link_entity_id?: string | number | null | null,
>         link_entity_type?: string | null | null,
>         data?: {
>         } | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null
>     }[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   }[] | null
> }[] | null
> ```

***

## Tax Rates

### list

`taxRates.list`

List all available tax rates for the administration, one page at a time (scopes: any of settings, sales\_invoices, documents or estimates)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.taxRates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `percentage:21,tax_rate_type:sales_invoice`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| --- \| --- \| --- \| --- \| \| name \| `String` \| \| Select tax rates by their full name \| \| partial\_name \| `String` \| \| Select tax rates with this substring in their name \| \| percentage \| `Integer` \| \| Select tax rates with the specified percentage, e.g. specify `21` for 21% \| \| tax\_rate\_type \| `String` \| \| `general_journal_document`, `purchase_invoice` or `sales_invoice`. Without this filter, tax rates of all types are returned \| \| country \| `String` \| \| Select tax rates with the specified country. Must be a 2 letter abbreviation following ISO 3166. Please note that only foreign tax rates will have this field set. Domestic tax rates will not have this set at the moment. \| \| show\_tax \| `Boolean` \| \| Use `true` to tax rates for which tax is shown on the invoice, `false` for when it's not shown. No value will select both \| \| active \| `Boolean` \| \| Use `true` to select active tax rates. Use `false` for inactive tax rates. No value will select both \| \| created\_after \| `String` \| \| Tax rates created after the given time (exclusive). ISO 8601 formatted string. The time to compare with is in UTC timezone \| \| updated\_after \| `String` \| \| Tax rates updated after the given time (exclusive). ISO 8601 formatted string. The time to compare with is in UTC timezone \| You can filter by multiple tax rate types at the same time by separating the values with a pipe (`tax_rate_type:purchase_invoice\|sales_invoice`). |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   name?: string | null,
>   percentage?: string | number | null | null | null,
>   tax_rate_type?: string | null,
>   show_tax?: boolean | null | null,
>   active?: boolean | null | null,
>   country?: string | null | null,
>   created_at?: string | null | null,
>   updated_at?: string | null | null
> }[]
> ```

***

## Time Entries

### create

`timeEntries.create`

Create a time entry from started\_at to ended\_at; Moneybird rounds to full minutes (scope: time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.timeEntries.create({
	time_entry: {
		user_id: '445001234567000001',
		started_at: '2026-04-09T09:00:00Z',
		ended_at: '2026-04-09T10:30:00Z',
		description: 'Kickoff call',
		billable: true,
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `time_entry` | `object` | No | — |

> [accordion] time\_entry full type
>
> ```ts theme={null}
> {
>   user_id: string | number,
>   started_at: string,
>   ended_at?: string,
>   description: string,
>   contact_id?: string | number,
>   project_id?: string | number,
>   sales_invoice_id?: string | number,
>   billable?: boolean | string,
>   paused_duration?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `project_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `started_at` | `string \| null` | No | — |
| `ended_at` | `string \| null \| null` | No | — |
| `description` | `string \| null` | No | — |
| `paused_duration` | `number \| null` | No | — |
| `billable` | `boolean \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `contact` | `object \| null` | No | — |
| `user` | `object \| null` | No | — |
| `project` | `object \| null` | No | — |
| `sales_invoice` | `object \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `notes` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   company_name?: string | null | null
> } | null | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

> [accordion] project full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   state?: string | null,
>   budget?: number | null | null
> } | null | null
> ```

> [accordion] sales\_invoice full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   invoice_id?: string | null | null,
>   recurring_sales_invoice_id?: string | number | null | null,
>   subscription_id?: string | number | null | null,
>   workflow_id?: string | number | null,
>   document_style_id?: string | number | null,
>   identity_id?: string | number | null,
>   draft_id?: number | null | null,
>   state?: string | null,
>   invoice_date?: string | null | null,
>   due_date?: string | null,
>   payment_conditions?: string | null | null,
>   payment_reference?: string | null | null,
>   short_payment_reference?: string | null | null,
>   reference?: string | null | null,
>   language?: string | null | null,
>   currency?: string | null,
>   discount?: string | null | null,
>   original_sales_invoice_id?: string | number | null | null,
>   paused?: boolean | null,
>   paid_at?: string | null | null,
>   sent_at?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   public_view_code?: string | null | null,
>   public_view_code_expires_at?: string | null | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   total_paid?: string | null,
>   total_unpaid?: string | null,
>   total_unpaid_base?: string | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | null,
>   total_price_excl_tax_base?: string | null,
>   total_price_incl_tax?: string | null,
>   total_price_incl_tax_base?: string | null,
>   total_discount?: string | null,
>   marked_dubious_on?: string | null | null,
>   marked_uncollectible_on?: string | null | null,
>   reminder_count?: number | null | null,
>   next_reminder?: string | null | null,
>   original_estimate_id?: string | number | null | null,
>   url?: string | null,
>   payment_url?: string | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   tax_totals?: {
>     tax_rate_id?: string | number | null,
>     taxable_amount?: string | number | null | null,
>     taxable_amount_base?: string | number | null | null,
>     tax_amount?: string | number | null | null,
>     tax_amount_base?: string | number | null | null
>   }[] | null,
>   time_entries?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     contact_id?: string | number | null | null,
>     project_id?: string | number | null | null,
>     user_id?: string | number | null,
>     started_at?: string | null,
>     ended_at?: string | null,
>     description?: string | null | null,
>     paused_duration?: number | null,
>     billable?: boolean | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> } | null | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### delete

`timeEntries.delete`

Delete a time entry: delete a time entry by id (scope: time\_entries)

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

```ts theme={null}
await corsair.moneybird.api.timeEntries.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### get

`timeEntries.get`

Get a time entry by id (scope: time\_entries)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.timeEntries.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `project_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `started_at` | `string \| null` | No | — |
| `ended_at` | `string \| null \| null` | No | — |
| `description` | `string \| null` | No | — |
| `paused_duration` | `number \| null` | No | — |
| `billable` | `boolean \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `contact` | `object \| null` | No | — |
| `user` | `object \| null` | No | — |
| `project` | `object \| null` | No | — |
| `sales_invoice` | `object \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `notes` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   company_name?: string | null | null
> } | null | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

> [accordion] project full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   state?: string | null,
>   budget?: number | null | null
> } | null | null
> ```

> [accordion] sales\_invoice full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   invoice_id?: string | null | null,
>   recurring_sales_invoice_id?: string | number | null | null,
>   subscription_id?: string | number | null | null,
>   workflow_id?: string | number | null,
>   document_style_id?: string | number | null,
>   identity_id?: string | number | null,
>   draft_id?: number | null | null,
>   state?: string | null,
>   invoice_date?: string | null | null,
>   due_date?: string | null,
>   payment_conditions?: string | null | null,
>   payment_reference?: string | null | null,
>   short_payment_reference?: string | null | null,
>   reference?: string | null | null,
>   language?: string | null | null,
>   currency?: string | null,
>   discount?: string | null | null,
>   original_sales_invoice_id?: string | number | null | null,
>   paused?: boolean | null,
>   paid_at?: string | null | null,
>   sent_at?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   public_view_code?: string | null | null,
>   public_view_code_expires_at?: string | null | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   total_paid?: string | null,
>   total_unpaid?: string | null,
>   total_unpaid_base?: string | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | null,
>   total_price_excl_tax_base?: string | null,
>   total_price_incl_tax?: string | null,
>   total_price_incl_tax_base?: string | null,
>   total_discount?: string | null,
>   marked_dubious_on?: string | null | null,
>   marked_uncollectible_on?: string | null | null,
>   reminder_count?: number | null | null,
>   next_reminder?: string | null | null,
>   original_estimate_id?: string | number | null | null,
>   url?: string | null,
>   payment_url?: string | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   tax_totals?: {
>     tax_rate_id?: string | number | null,
>     taxable_amount?: string | number | null | null,
>     taxable_amount_base?: string | number | null | null,
>     tax_amount?: string | number | null | null,
>     tax_amount_base?: string | number | null | null
>   }[] | null,
>   time_entries?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     contact_id?: string | number | null | null,
>     project_id?: string | number | null | null,
>     user_id?: string | number | null,
>     started_at?: string | null,
>     ended_at?: string | null,
>     description?: string | null | null,
>     paused_duration?: number | null,
>     billable?: boolean | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> } | null | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### list

`timeEntries.list`

List all time entries, one page at a time (scope: time\_entries)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.timeEntries.list({ filter: 'period:this_year' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `filter` | `string` | No | Filters are `key:value` terms separated by commas (e.g. `period:this_year,state:all`). Any filter you pass replaces the defaults below entirely, so include every key you need. Available filters: \| **Filter** \| **Type** \| **Default** \| **Description** \| \| --- \| --- \| --- \| --- \| \| state \| `String` \| `all` \| `all`, `open` or `non_billable` \| \| period \| `String` \| `this_year` \| This can either be the description of a period (`this_week`, `prev_week`, `next_week`, `this_month`, `prev_month`, `next_month`, `this_quarter`, `prev_quarter`, `next_quarter`, `this_year`, `prev_year`, `next_year`) or a custom period (`201301..201302`, `20130101..20130131`). A custom period must have a start and an end date. It must not be longer than 10 years and must be between `20000101` and `21000101`. For one month, use `202401..202401`, not `202401`. Without `period`, the filter does not limit the dates. The default `this_year` applies only when you send no `filter`. \| \| contact\_id \| `Integer` \| \| Select time entries belonging to a certain contact \| \| include\_nil\_contacts \| `Boolean` \| false \| Whether to include time entries that have no assigned contact \| \| include\_active \| `Boolean` \| false \| Whether to include active time entries i.e. time entries without ended\_at \| \| project\_id \| `Integer` \| \| Select time entries belonging to a certain project \| \| user\_id \| `Integer` \| \| Select time entries belonging to a certain user \| \| day \| `Date` \| \| Select time entries on a specific date \| You can filter by multiple states at the same time as well. To do this, separate the state values by a pipe: `state:open\|non_billable`. |
| `page` | `number \| string` | No | — |
| `per_page` | `number \| string` | No | — |
| `query` | `string` | No | Free-text search across the time entry description. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while this page came back full (per\_page; 100 when left out), null once it came back short. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null | null,
>   project_id?: string | number | null | null,
>   sales_invoice_id?: string | number | null | null,
>   user_id?: string | number | null,
>   started_at?: string | null,
>   ended_at?: string | null | null,
>   description?: string | null,
>   paused_duration?: number | null,
>   billable?: boolean | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   contact?: {
>     id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     company_name?: string | null | null
>   } | null | null,
>   user?: {
>     id?: string | number | null,
>     name?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   } | null,
>   project?: {
>     id?: string | number | null,
>     name?: string | null,
>     state?: string | null,
>     budget?: number | null | null
>   } | null | null,
>   sales_invoice?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     contact_id?: string | number | null,
>     contact?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       company_name?: string | null | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       address1?: string | null | null,
>       address2?: string | null | null,
>       zipcode?: string | null | null,
>       city?: string | null | null,
>       country?: string | null,
>       phone?: string | null | null,
>       delivery_method?: string | null | null,
>       customer_id?: string | null,
>       tax_number?: string | null | null,
>       chamber_of_commerce?: string | null | null,
>       bank_account?: string | null | null,
>       is_trusted?: boolean | null,
>       max_transfer_amount?: string | null | null,
>       attention?: string | null | null,
>       email?: string | null | null,
>       email_ubl?: boolean | null,
>       send_invoices_to_attention?: string | null | null,
>       send_invoices_to_email?: string | null | null,
>       send_estimates_to_attention?: string | null | null,
>       send_estimates_to_email?: string | null | null,
>       send_reminders_to_attention?: string | null | null,
>       send_reminders_to_email?: string | null | null,
>       direct_debit?: boolean | null,
>       sepa_active?: boolean | null | null,
>       sepa_iban?: string | null | null,
>       sepa_iban_account_name?: string | null | null,
>       sepa_bic?: string | null | null,
>       sepa_mandate_id?: string | null | null,
>       sepa_mandate_date?: string | null | null,
>       sepa_sequence_type?: string | null,
>       credit_card_number?: string | null | null,
>       credit_card_reference?: string | null | null,
>       credit_card_type?: string | null | null,
>       tax_number_validated_at?: string | null | null,
>       tax_number_valid?: boolean | null | null,
>       invoice_workflow_id?: string | number | null | null,
>       estimate_workflow_id?: string | number | null | null,
>       si_identifier?: string | null | null,
>       si_identifier_type?: string | null | null,
>       moneybird_payments_mandate?: boolean | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null,
>       sales_invoices_url?: string | null,
>       notes?: {
>         id?: string | number | null,
>         administration_id?: string | number | null,
>         entity_id?: string | number | null | null,
>         entity_type?: string | null,
>         user_id?: string | number | null,
>         assignee_id?: string | number | null | null,
>         todo?: boolean | string | null | null,
>         note?: string | null | null,
>         completed_at?: string | null | null,
>         completed_by_id?: string | number | null | null,
>         todo_type?: string | null | null,
>         data?: {
>         } | null | null,
>         created_at?: string | null,
>         updated_at?: string | null
>       }[] | null,
>       custom_fields?: {
>         id?: string | number | null,
>         name?: string | null,
>         value?: string | null
>       }[] | null,
>       contact_people?: {
>         id?: string | number | null | null,
>         contact_id?: string | number | null | null,
>         administration_id?: string | number | null,
>         firstname?: string | null | null,
>         lastname?: string | null | null,
>         phone?: string | null | null,
>         email?: string | null | null,
>         department?: string | null | null,
>         created_at?: string | null | null,
>         updated_at?: string | null | null,
>         version?: number | null
>       }[] | null,
>       archived?: boolean | null
>     } | null,
>     contact_person_id?: string | number | null | null,
>     contact_person?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     } | null | null,
>     invoice_id?: string | null | null,
>     recurring_sales_invoice_id?: string | number | null | null,
>     subscription_id?: string | number | null | null,
>     workflow_id?: string | number | null,
>     document_style_id?: string | number | null,
>     identity_id?: string | number | null,
>     draft_id?: number | null | null,
>     state?: string | null,
>     invoice_date?: string | null | null,
>     due_date?: string | null,
>     payment_conditions?: string | null | null,
>     payment_reference?: string | null | null,
>     short_payment_reference?: string | null | null,
>     reference?: string | null | null,
>     language?: string | null | null,
>     currency?: string | null,
>     discount?: string | null | null,
>     original_sales_invoice_id?: string | number | null | null,
>     paused?: boolean | null,
>     paid_at?: string | null | null,
>     sent_at?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     public_view_code?: string | null | null,
>     public_view_code_expires_at?: string | null | null,
>     version?: number | null,
>     details?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       tax_rate_id?: string | number | null,
>       ledger_account_id?: string | number | null,
>       project_id?: string | number | null | null,
>       product_id?: string | number | null | null,
>       amount?: string | null | null,
>       amount_decimal?: string | null | null,
>       description?: string | null,
>       price?: string | null,
>       period?: string | null | null,
>       row_order?: number | null,
>       total_price_excl_tax_with_discount?: string | number | null | null,
>       total_price_excl_tax_with_discount_base?: string | number | null | null,
>       tax_report_reference?: (string | null)[] | null,
>       mandatory_tax_text?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       is_optional?: boolean | null,
>       is_selected?: boolean | null
>     }[] | null,
>     payments?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       invoice_type?: string | null,
>       invoice_id?: string | number | null,
>       financial_account_id?: string | number | null | null,
>       user_id?: string | number | null,
>       payment_transaction_id?: string | number | null | null,
>       transaction_identifier?: string | null | null,
>       price?: string | number | null | null,
>       price_base?: string | number | null | null,
>       payment_date?: string | null,
>       credit_invoice_id?: string | number | null | null,
>       financial_mutation_id?: string | number | null | null,
>       ledger_account_id?: string | number | null | null,
>       linked_payment_id?: string | number | null | null,
>       manual_payment_action?: string | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     total_paid?: string | null,
>     total_unpaid?: string | null,
>     total_unpaid_base?: string | null,
>     prices_are_incl_tax?: boolean | null,
>     total_price_excl_tax?: string | null,
>     total_price_excl_tax_base?: string | null,
>     total_price_incl_tax?: string | null,
>     total_price_incl_tax_base?: string | null,
>     total_discount?: string | null,
>     marked_dubious_on?: string | null | null,
>     marked_uncollectible_on?: string | null | null,
>     reminder_count?: number | null | null,
>     next_reminder?: string | null | null,
>     original_estimate_id?: string | number | null | null,
>     url?: string | null,
>     payment_url?: string | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     attachments?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       attachable_id?: string | number | null,
>       attachable_type?: string | null,
>       filename?: string | null,
>       content_type?: string | null,
>       size?: number | null,
>       rotation?: number | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null
>     }[] | null,
>     events?: {
>       id?: string | number | null,
>       administration_id?: string | number | null | null,
>       user_id?: string | number | null,
>       action?: string | null,
>       entity_type?: string | null,
>       entity_id?: string | number | null | null,
>       link_entity_id?: string | number | null | null,
>       link_entity_type?: string | null | null,
>       data?: {
>       } | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     tax_totals?: {
>       tax_rate_id?: string | number | null,
>       taxable_amount?: string | number | null | null,
>       taxable_amount_base?: string | number | null | null,
>       tax_amount?: string | number | null | null,
>       tax_amount_base?: string | number | null | null
>     }[] | null,
>     time_entries?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       contact_id?: string | number | null | null,
>       project_id?: string | number | null | null,
>       user_id?: string | number | null,
>       started_at?: string | null,
>       ended_at?: string | null,
>       description?: string | null | null,
>       paused_duration?: number | null,
>       billable?: boolean | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null
>   } | null | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***

### notes.create

`timeEntries.notes.create`

Adds note to entity: adds a note to the time entry (scope: time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.timeEntries.notes.create({
	time_entry_id: '458026356994737217',
	note: { note: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `time_entry_id` | `string \| number` | Yes | A unique record identifier |
| `note` | `object` | No | — |

> [accordion] note full type
>
> ```ts theme={null}
> {
>   note?: string,
>   todo?: boolean | string,
>   assignee_id?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `entity_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `entity_type` | `string \| null` | No | — |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `assignee_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo` | `boolean \| string \| null \| null` | No | — |
| `note` | `string \| null \| null` | No | — |
| `completed_at` | `string \| null \| null` | No | — |
| `completed_by_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `todo_type` | `string \| null \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

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

***

### notes.delete

`timeEntries.notes.delete`

Destroys note from entity (scope: time\_entries)

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

```ts theme={null}
await corsair.moneybird.api.timeEntries.notes.delete({ time_entry_id: '458026356994737217', id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `time_entry_id` | `string \| number` | Yes | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### resume

`timeEntries.resume`

Resume a stopped timer: resumes a stopped time entry (scope: time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.timeEntries.resume({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `project_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `started_at` | `string \| null` | No | — |
| `ended_at` | `string \| null \| null` | No | — |
| `description` | `string \| null` | No | — |
| `paused_duration` | `number \| null` | No | — |
| `billable` | `boolean \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `contact` | `object \| null` | No | — |
| `user` | `object \| null` | No | — |
| `project` | `object \| null` | No | — |
| `sales_invoice` | `object \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `notes` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   company_name?: string | null | null
> } | null | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

> [accordion] project full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   state?: string | null,
>   budget?: number | null | null
> } | null | null
> ```

> [accordion] sales\_invoice full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   invoice_id?: string | null | null,
>   recurring_sales_invoice_id?: string | number | null | null,
>   subscription_id?: string | number | null | null,
>   workflow_id?: string | number | null,
>   document_style_id?: string | number | null,
>   identity_id?: string | number | null,
>   draft_id?: number | null | null,
>   state?: string | null,
>   invoice_date?: string | null | null,
>   due_date?: string | null,
>   payment_conditions?: string | null | null,
>   payment_reference?: string | null | null,
>   short_payment_reference?: string | null | null,
>   reference?: string | null | null,
>   language?: string | null | null,
>   currency?: string | null,
>   discount?: string | null | null,
>   original_sales_invoice_id?: string | number | null | null,
>   paused?: boolean | null,
>   paid_at?: string | null | null,
>   sent_at?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   public_view_code?: string | null | null,
>   public_view_code_expires_at?: string | null | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   total_paid?: string | null,
>   total_unpaid?: string | null,
>   total_unpaid_base?: string | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | null,
>   total_price_excl_tax_base?: string | null,
>   total_price_incl_tax?: string | null,
>   total_price_incl_tax_base?: string | null,
>   total_discount?: string | null,
>   marked_dubious_on?: string | null | null,
>   marked_uncollectible_on?: string | null | null,
>   reminder_count?: number | null | null,
>   next_reminder?: string | null | null,
>   original_estimate_id?: string | number | null | null,
>   url?: string | null,
>   payment_url?: string | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   tax_totals?: {
>     tax_rate_id?: string | number | null,
>     taxable_amount?: string | number | null | null,
>     taxable_amount_base?: string | number | null | null,
>     tax_amount?: string | number | null | null,
>     tax_amount_base?: string | number | null | null
>   }[] | null,
>   time_entries?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     contact_id?: string | number | null | null,
>     project_id?: string | number | null | null,
>     user_id?: string | number | null,
>     started_at?: string | null,
>     ended_at?: string | null,
>     description?: string | null | null,
>     paused_duration?: number | null,
>     billable?: boolean | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> } | null | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### stop

`timeEntries.stop`

Stops an active time entry (scope: time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.timeEntries.stop({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `project_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `started_at` | `string \| null` | No | — |
| `ended_at` | `string \| null \| null` | No | — |
| `description` | `string \| null` | No | — |
| `paused_duration` | `number \| null` | No | — |
| `billable` | `boolean \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `contact` | `object \| null` | No | — |
| `user` | `object \| null` | No | — |
| `project` | `object \| null` | No | — |
| `sales_invoice` | `object \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `notes` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   company_name?: string | null | null
> } | null | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

> [accordion] project full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   state?: string | null,
>   budget?: number | null | null
> } | null | null
> ```

> [accordion] sales\_invoice full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   invoice_id?: string | null | null,
>   recurring_sales_invoice_id?: string | number | null | null,
>   subscription_id?: string | number | null | null,
>   workflow_id?: string | number | null,
>   document_style_id?: string | number | null,
>   identity_id?: string | number | null,
>   draft_id?: number | null | null,
>   state?: string | null,
>   invoice_date?: string | null | null,
>   due_date?: string | null,
>   payment_conditions?: string | null | null,
>   payment_reference?: string | null | null,
>   short_payment_reference?: string | null | null,
>   reference?: string | null | null,
>   language?: string | null | null,
>   currency?: string | null,
>   discount?: string | null | null,
>   original_sales_invoice_id?: string | number | null | null,
>   paused?: boolean | null,
>   paid_at?: string | null | null,
>   sent_at?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   public_view_code?: string | null | null,
>   public_view_code_expires_at?: string | null | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   total_paid?: string | null,
>   total_unpaid?: string | null,
>   total_unpaid_base?: string | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | null,
>   total_price_excl_tax_base?: string | null,
>   total_price_incl_tax?: string | null,
>   total_price_incl_tax_base?: string | null,
>   total_discount?: string | null,
>   marked_dubious_on?: string | null | null,
>   marked_uncollectible_on?: string | null | null,
>   reminder_count?: number | null | null,
>   next_reminder?: string | null | null,
>   original_estimate_id?: string | number | null | null,
>   url?: string | null,
>   payment_url?: string | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   tax_totals?: {
>     tax_rate_id?: string | number | null,
>     taxable_amount?: string | number | null | null,
>     taxable_amount_base?: string | number | null | null,
>     tax_amount?: string | number | null | null,
>     tax_amount_base?: string | number | null | null
>   }[] | null,
>   time_entries?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     contact_id?: string | number | null | null,
>     project_id?: string | number | null | null,
>     user_id?: string | number | null,
>     started_at?: string | null,
>     ended_at?: string | null,
>     description?: string | null | null,
>     paused_duration?: number | null,
>     billable?: boolean | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> } | null | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### update

`timeEntries.update`

Update a time entry: when updating a time entry, provide only the attributes you want to update (scope: time\_entries)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.timeEntries.update({
	id: '458026356994737217',
	time_entry: { description: 'Kickoff call and follow-up' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |
| `time_entry` | `object` | No | — |

> [accordion] time\_entry full type
>
> ```ts theme={null}
> {
>   started_at?: string,
>   ended_at?: string,
>   paused_duration?: number,
>   contact_id?: string | number,
>   project_id?: string | number,
>   sales_invoice_id?: string | number,
>   description?: string,
>   billable?: boolean | string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `contact_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `project_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `sales_invoice_id` | `string \| number \| null \| null` | No | A unique record identifier |
| `user_id` | `string \| number \| null` | No | A unique record identifier |
| `started_at` | `string \| null` | No | — |
| `ended_at` | `string \| null \| null` | No | — |
| `description` | `string \| null` | No | — |
| `paused_duration` | `number \| null` | No | — |
| `billable` | `boolean \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `contact` | `object \| null` | No | — |
| `user` | `object \| null` | No | — |
| `project` | `object \| null` | No | — |
| `sales_invoice` | `object \| null` | No | — |
| `events` | `object[] \| null` | No | Use `GET /{administration_id}/events` with `entity_type` and `entity_id` instead. |
| `notes` | `object[] \| null` | No | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   firstname?: string | null | null,
>   lastname?: string | null | null,
>   company_name?: string | null | null
> } | null | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

> [accordion] project full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   state?: string | null,
>   budget?: number | null | null
> } | null | null
> ```

> [accordion] sales\_invoice full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   contact_id?: string | number | null,
>   contact?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     company_name?: string | null | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     address1?: string | null | null,
>     address2?: string | null | null,
>     zipcode?: string | null | null,
>     city?: string | null | null,
>     country?: string | null,
>     phone?: string | null | null,
>     delivery_method?: string | null | null,
>     customer_id?: string | null,
>     tax_number?: string | null | null,
>     chamber_of_commerce?: string | null | null,
>     bank_account?: string | null | null,
>     is_trusted?: boolean | null,
>     max_transfer_amount?: string | null | null,
>     attention?: string | null | null,
>     email?: string | null | null,
>     email_ubl?: boolean | null,
>     send_invoices_to_attention?: string | null | null,
>     send_invoices_to_email?: string | null | null,
>     send_estimates_to_attention?: string | null | null,
>     send_estimates_to_email?: string | null | null,
>     send_reminders_to_attention?: string | null | null,
>     send_reminders_to_email?: string | null | null,
>     direct_debit?: boolean | null,
>     sepa_active?: boolean | null | null,
>     sepa_iban?: string | null | null,
>     sepa_iban_account_name?: string | null | null,
>     sepa_bic?: string | null | null,
>     sepa_mandate_id?: string | null | null,
>     sepa_mandate_date?: string | null | null,
>     sepa_sequence_type?: string | null,
>     credit_card_number?: string | null | null,
>     credit_card_reference?: string | null | null,
>     credit_card_type?: string | null | null,
>     tax_number_validated_at?: string | null | null,
>     tax_number_valid?: boolean | null | null,
>     invoice_workflow_id?: string | number | null | null,
>     estimate_workflow_id?: string | number | null | null,
>     si_identifier?: string | null | null,
>     si_identifier_type?: string | null | null,
>     moneybird_payments_mandate?: boolean | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null,
>     sales_invoices_url?: string | null,
>     notes?: {
>       id?: string | number | null,
>       administration_id?: string | number | null,
>       entity_id?: string | number | null | null,
>       entity_type?: string | null,
>       user_id?: string | number | null,
>       assignee_id?: string | number | null | null,
>       todo?: boolean | string | null | null,
>       note?: string | null | null,
>       completed_at?: string | null | null,
>       completed_by_id?: string | number | null | null,
>       todo_type?: string | null | null,
>       data?: {
>       } | null | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     }[] | null,
>     custom_fields?: {
>       id?: string | number | null,
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     contact_people?: {
>       id?: string | number | null | null,
>       contact_id?: string | number | null | null,
>       administration_id?: string | number | null,
>       firstname?: string | null | null,
>       lastname?: string | null | null,
>       phone?: string | null | null,
>       email?: string | null | null,
>       department?: string | null | null,
>       created_at?: string | null | null,
>       updated_at?: string | null | null,
>       version?: number | null
>     }[] | null,
>     archived?: boolean | null
>   } | null,
>   contact_person_id?: string | number | null | null,
>   contact_person?: {
>     id?: string | number | null | null,
>     contact_id?: string | number | null | null,
>     administration_id?: string | number | null,
>     firstname?: string | null | null,
>     lastname?: string | null | null,
>     phone?: string | null | null,
>     email?: string | null | null,
>     department?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     version?: number | null
>   } | null | null,
>   invoice_id?: string | null | null,
>   recurring_sales_invoice_id?: string | number | null | null,
>   subscription_id?: string | number | null | null,
>   workflow_id?: string | number | null,
>   document_style_id?: string | number | null,
>   identity_id?: string | number | null,
>   draft_id?: number | null | null,
>   state?: string | null,
>   invoice_date?: string | null | null,
>   due_date?: string | null,
>   payment_conditions?: string | null | null,
>   payment_reference?: string | null | null,
>   short_payment_reference?: string | null | null,
>   reference?: string | null | null,
>   language?: string | null | null,
>   currency?: string | null,
>   discount?: string | null | null,
>   original_sales_invoice_id?: string | number | null | null,
>   paused?: boolean | null,
>   paid_at?: string | null | null,
>   sent_at?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   public_view_code?: string | null | null,
>   public_view_code_expires_at?: string | null | null,
>   version?: number | null,
>   details?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     tax_rate_id?: string | number | null,
>     ledger_account_id?: string | number | null,
>     project_id?: string | number | null | null,
>     product_id?: string | number | null | null,
>     amount?: string | null | null,
>     amount_decimal?: string | null | null,
>     description?: string | null,
>     price?: string | null,
>     period?: string | null | null,
>     row_order?: number | null,
>     total_price_excl_tax_with_discount?: string | number | null | null,
>     total_price_excl_tax_with_discount_base?: string | number | null | null,
>     tax_report_reference?: (string | null)[] | null,
>     mandatory_tax_text?: string | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null,
>     is_optional?: boolean | null,
>     is_selected?: boolean | null
>   }[] | null,
>   payments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     invoice_type?: string | null,
>     invoice_id?: string | number | null,
>     financial_account_id?: string | number | null | null,
>     user_id?: string | number | null,
>     payment_transaction_id?: string | number | null | null,
>     transaction_identifier?: string | null | null,
>     price?: string | number | null | null,
>     price_base?: string | number | null | null,
>     payment_date?: string | null,
>     credit_invoice_id?: string | number | null | null,
>     financial_mutation_id?: string | number | null | null,
>     ledger_account_id?: string | number | null | null,
>     linked_payment_id?: string | number | null | null,
>     manual_payment_action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   total_paid?: string | null,
>   total_unpaid?: string | null,
>   total_unpaid_base?: string | null,
>   prices_are_incl_tax?: boolean | null,
>   total_price_excl_tax?: string | null,
>   total_price_excl_tax_base?: string | null,
>   total_price_incl_tax?: string | null,
>   total_price_incl_tax_base?: string | null,
>   total_discount?: string | null,
>   marked_dubious_on?: string | null | null,
>   marked_uncollectible_on?: string | null | null,
>   reminder_count?: number | null | null,
>   next_reminder?: string | null | null,
>   original_estimate_id?: string | number | null | null,
>   url?: string | null,
>   payment_url?: string | null,
>   custom_fields?: {
>     id?: string | number | null,
>     name?: string | null,
>     value?: string | null
>   }[] | null,
>   notes?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     entity_id?: string | number | null | null,
>     entity_type?: string | null,
>     user_id?: string | number | null,
>     assignee_id?: string | number | null | null,
>     todo?: boolean | string | null | null,
>     note?: string | null | null,
>     completed_at?: string | null | null,
>     completed_by_id?: string | number | null | null,
>     todo_type?: string | null | null,
>     data?: {
>     } | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   attachments?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     attachable_id?: string | number | null,
>     attachable_type?: string | null,
>     filename?: string | null,
>     content_type?: string | null,
>     size?: number | null,
>     rotation?: number | null | null,
>     created_at?: string | null | null,
>     updated_at?: string | null | null
>   }[] | null,
>   events?: {
>     id?: string | number | null,
>     administration_id?: string | number | null | null,
>     user_id?: string | number | null,
>     action?: string | null,
>     entity_type?: string | null,
>     entity_id?: string | number | null | null,
>     link_entity_id?: string | number | null | null,
>     link_entity_type?: string | null | null,
>     data?: {
>     } | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null,
>   tax_totals?: {
>     tax_rate_id?: string | number | null,
>     taxable_amount?: string | number | null | null,
>     taxable_amount_base?: string | number | null | null,
>     tax_amount?: string | number | null | null,
>     tax_amount_base?: string | number | null | null
>   }[] | null,
>   time_entries?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     contact_id?: string | number | null | null,
>     project_id?: string | number | null | null,
>     user_id?: string | number | null,
>     started_at?: string | null,
>     ended_at?: string | null,
>     description?: string | null | null,
>     paused_duration?: number | null,
>     billable?: boolean | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> } | null | null
> ```

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null | null,
>   user_id?: string | number | null,
>   action?: string | null,
>   entity_type?: string | null,
>   entity_id?: string | number | null | null,
>   link_entity_id?: string | number | null | null,
>   link_entity_type?: string | null | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] notes full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   entity_id?: string | number | null | null,
>   entity_type?: string | null,
>   user_id?: string | number | null,
>   assignee_id?: string | number | null | null,
>   todo?: boolean | string | null | null,
>   note?: string | null | null,
>   completed_at?: string | null | null,
>   completed_by_id?: string | number | null | null,
>   todo_type?: string | null | null,
>   data?: {
>   } | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

## Users

### list

`users.list`

List all users (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.users.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `include_inactive` | `boolean \| string` | No | — |
| `include_accountants` | `boolean \| string` | No | — |
| `include_api_users` | `boolean \| string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   name?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   email?: string | null,
>   email_validated?: boolean | null,
>   language?: string | null,
>   time_zone?: string | null,
>   user_type?: string | null,
>   permissions?: string[] | null
> }[]
> ```

***

## Verifications

### list

`verifications.list`

Retrieve verifications: retrieve all the verifications within an administration (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.verifications.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `emails` | `string[] \| null` | No | — |
| `bank_account_numbers` | `string[] \| null` | No | — |
| `chamber_of_commerce_number` | `string \| null` | No | — |
| `tax_number` | `string \| null` | No | — |

***

## Webhooks

### activate

`webhooks.activate`

Activate a webhook: activates a previously deactivated webhook (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.webhooks.activate({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `enabled_events` | `string[] \| null` | No | List of events this webhook is subscribed to. See [webhook events](https://developer.moneybird.com/webhooks/events) for all available events and event groups. |
| `last_http_status` | `number \| string \| null \| null` | No | HTTP status code of the request last received back from the webhook |
| `last_http_body` | `string \| null \| null` | No | Body of the request last received back from the webhook |
| `token` | `string \| null` | No | — |
| `secret` | `string \| null` | No | The webhook's secret, used to generate webhook signatures. Only returned at creation. |
| `deactivated_at` | `string \| null \| null` | No | Timestamp when the webhook was deactivated. Null if the webhook is active. |

***

### create

`webhooks.create`

Create a webhook (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.webhooks.create({ url: 'https://example.com/moneybird/webhooks' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `url` | `string` | Yes | The HTTPS endpoint URL that will receive webhook notifications. Must respond with HTTP 200 on creation. |
| `enabled_events` | `string[]` | No | List of events to subscribe to. See [webhook events](https://developer.moneybird.com/webhooks/events) for all available events and event groups. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `enabled_events` | `string[] \| null` | No | List of events this webhook is subscribed to. See [webhook events](https://developer.moneybird.com/webhooks/events) for all available events and event groups. |
| `last_http_status` | `number \| string \| null \| null` | No | HTTP status code of the request last received back from the webhook |
| `last_http_body` | `string \| null \| null` | No | Body of the request last received back from the webhook |
| `token` | `string \| null` | No | — |
| `secret` | `string \| null` | No | The webhook's secret, used to generate webhook signatures. Only returned at creation. |
| `deactivated_at` | `string \| null \| null` | No | Timestamp when the webhook was deactivated. Null if the webhook is active. |

***

### deactivate

`webhooks.deactivate`

Deactivate a webhook: deactivates a webhook (scope: settings)

**Risk:** `write`

```ts theme={null}
await corsair.moneybird.api.webhooks.deactivate({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `url` | `string \| null` | No | — |
| `enabled_events` | `string[] \| null` | No | List of events this webhook is subscribed to. See [webhook events](https://developer.moneybird.com/webhooks/events) for all available events and event groups. |
| `last_http_status` | `number \| string \| null \| null` | No | HTTP status code of the request last received back from the webhook |
| `last_http_body` | `string \| null \| null` | No | Body of the request last received back from the webhook |
| `token` | `string \| null` | No | — |
| `secret` | `string \| null` | No | The webhook's secret, used to generate webhook signatures. Only returned at creation. |
| `deactivated_at` | `string \| null \| null` | No | Timestamp when the webhook was deactivated. Null if the webhook is active. |

***

### delete

`webhooks.delete`

Delete a webhook: remove a registered webhook (scope: settings)

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

```ts theme={null}
await corsair.moneybird.api.webhooks.delete({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Moneybird accepted the call; it answered with no body. |

***

### list

`webhooks.list`

List all webhooks: list all registered webhooks for the administration (scope: settings)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.webhooks.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   url?: string | null,
>   enabled_events?: string[] | null,
>   last_http_status?: number | string | null | null,
>   last_http_body?: string | null | null,
>   token?: string | null,
>   secret?: string | null,
>   deactivated_at?: string | null | null
> }[]
> ```

***

## Workflows

### get

`workflows.get`

Get a workflow by id (scopes: any of settings, sales\_invoices, documents, estimates or bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.workflows.get({ id: '458026356994737217' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |
| `id` | `string \| number` | Yes | A unique record identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | A unique record identifier |
| `administration_id` | `string \| number \| null` | No | A unique record identifier |
| `type` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `default` | `boolean \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `language` | `string \| null` | No | — |
| `active` | `boolean \| null` | No | — |
| `prices_are_incl_tax` | `boolean \| null` | No | — |
| `payment_methods` | `string[] \| null \| null` | No | — |
| `collection_method` | `string \| null \| null` | No | — |
| `number_of_collections` | `number \| null` | No | — |
| `show_qr_code` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `steps` | `object[] \| null` | No | — |

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   step_order?: number | null,
>   due_interval?: number | null,
>   reminder_delay?: number | null,
>   reminder_text?: string | null | null,
>   reminder_auto_send?: boolean | null,
>   action?: string | null | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### list

`workflows.list`

Retrieve available workflows (scopes: any of settings, sales\_invoices, documents, estimates or bank)

**Risk:** `read`

```ts theme={null}
await corsair.moneybird.api.workflows.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `administration_id` | `string \| number` | No | A unique record identifier |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   administration_id?: string | number | null,
>   type?: string | null,
>   name?: string | null,
>   default?: boolean | null,
>   currency?: string | null,
>   language?: string | null,
>   active?: boolean | null,
>   prices_are_incl_tax?: boolean | null,
>   payment_methods?: string[] | null | null,
>   collection_method?: string | null | null,
>   number_of_collections?: number | null,
>   show_qr_code?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   steps?: {
>     id?: string | number | null,
>     administration_id?: string | number | null,
>     step_order?: number | null,
>     due_interval?: number | null,
>     reminder_delay?: number | null,
>     reminder_text?: string | null | null,
>     reminder_auto_send?: boolean | null,
>     action?: string | null | null,
>     created_at?: string | null,
>     updated_at?: string | null
>   }[] | null
> }[]
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.