bexio-dotnet
.NET library for the bexio API (2.0 and 3.0): invoices, contacts, accounting and more, with personal access token or OAuth2 sign-in.
AI-assisted- Tools
What it is
bexio-dotnet is a .NET client for the bexio API. It covers all documented operations of API versions 2.0 and 3.0 (272): sales (quotes, orders, invoices, reminders, delivery notes), contacts, items, projects and time tracking, accounting, bank accounts, files and purchase orders. Endpoints and models are generated from the official bexio API description.
Install
The package Bexio.DotNet is on NuGet: dotnet add package Bexio.DotNet. The guide is in the documentation, the source code is on GitHub.
What's inside
- Authentication: personal access token or OAuth2 for apps registered at bexio, including automatic token refresh and a token store for multiple bexio accounts
- Easy to start with: one IBexioClient groups all endpoints by API version, for example client.V2.Invoices or client.V3.Currencies
- Robust: every call is also available asynchronously, automatic retry on rate limits (429), paged reading of large lists
- Cleanly built: HttpClient with IHttpClientFactory, dependency injection, unit tests and a CI/CD pipeline on GitHub Actions, published to NuGet via trusted publishing
- Runs on .NET 10 (LTS)
Architecture
There is one client per bexio account. Every endpoint knows its API version and path, the transport layer takes care of the token, the base url and retries.
OAuth2 for registered apps
If you registered an app at bexio, you sign in with the authorization code flow. The library refreshes the token automatically and saves the newest refresh token in the token store, one per customer.
Status
The library is tested against the official API description, but not yet against the real bexio API. The project is open source (MIT); feedback and pull requests are welcome: issues on GitHub.