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

# FreshBooks clients

> Mount FreshBooks clients.

Follow the [REST app guide](https://docs.bijection.com/integrations/native-rest.md#mount-and-bind).
Pass the receiver below as `receivers.provider`, bound with `providerEndpoint`
from `@bijectionhq/app-rest` and sealed FreshBooks OAuth with client read permission.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
const provider = providerEndpoint(
  "freshbooks/clients.observations",
  "https://api.freshbooks.com",
  "/accounting/account/ACCOUNT_ID/users/clients",
  auth,
  data,
);
```

Pass the same label to the receiver binder and as the app's `data`. Call `<mount>.source.initialize`.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{ profile: { mode: "provider", provider: "freshbooks/clients.observations", limit: 25 } }
```

Replace `ACCOUNT_ID` with the business's `account_id`. Each sweep walks the regular and deleted listings, using their page numbers and totals. Client ID keys the rows. Visibility state 1 removes the row, while archived clients remain observable. Purged or omitted clients leave prior observations in place. The next poll begins a new sweep.

Up to 100 records and 36 KiB per response. The bundled parser is required. Rows and their next position
commit together. Review failures through `source.health`.

## Write clients

Follow the [native write app guide](https://docs.bijection.com/integrations/native-rest.md#native-provider-writes). Bind `providerWriter("freshbooks.clients.create-update-delete", { endpoint: "https://api.freshbooks.com", auth }, data)` and pass it as `receivers.writers["freshbooks.clients.create-update-delete"]`. Use `scope: ["ACCOUNT_ID"]` and a FreshBooks OAuth bearer allowed to write clients. Send a single `{ client: { … } }` body. Create and update accept HTTP 200 carrying the client ID. Delete sets `client.vis_state` to 1 on the exact client and accepts the provider’s HTTP 200 acknowledgement.

The writer records its evidence under the app's `data` label. Commands take up to 24 KiB of JSON and carry no read cursor.

[Provider write API](https://www.freshbooks.com/api/clients)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.