⚠️ This is a work in progress
A simple REST API client in .NET 8.0 for Bexio which is a powerful cloud based software for business administrations.
Find official API documentation here
As this is still a work in progress, only some API calls are implemented and tested.
- Contacts - Complete implementation (contacts, salutations, titles, groups, relations, additional addresses)
- Invoices - Complete implementation with CRUD operations, actions, and payment management
- Sales Order Management - Partial implementation (quotes, orders, invoices, deliveries, documents)
- Projects & Time Tracking - Complete implementation (projects, timesheets, business activities)
- User Management - Complete implementation (users, fictional users)
- Purchase - Planned (bills, expenses, purchase orders, outgoing payments)
- Accounting - Planned (accounts, currencies, manual entries, taxes, VAT periods)
- Banking - Planned (bank accounts, IBAN payments, QR payments)
- Items & Products - Partial (single article fetch only, stock locations and areas missing)
- Files - Planned (file management and operations)
- Company Profile - Company information endpoints
- Countries - Country management endpoints
- Languages - Language management endpoints
- Notes - Note management endpoints
- Payment Types - Payment type endpoints
- Permissions - Permission and access management
- Tasks - Task management endpoints
- Units - Unit management endpoints
Dot.NET
- NET >= 8.x.x -> https://dotnet.microsoft.com/en-us/download
- Obtain a Personal Access Token from here
- Check the bexio.net.Example project on how to use it
- Rename appsettings.example.json to appsettings.json
- Add your api token to the appsettings.json
- Run the example project and choose your option
- All GET request will be printed to the console and saved to a file in Responses folder
BexioApi accepts either a fixed token or an IAccessTokenProvider:
// Personal Access Token (https://developer.bexio.com/pat) - valid for 60 days only
var bexio = new BexioApi("<pat>");
// OAuth: the provider is asked for a token on every request and told via Invalidate() when
// bexio answered 401, so it can refresh short-lived access tokens transparently
var bexio = new BexioApi(myAccessTokenProvider);The OAuth Authorization Code Flow
itself (consent, token exchange, refresh token storage) belongs to the hosting application and is
not part of this client. If the provider throws, the request is not sent and an
AccessTokenException is thrown regardless of UnsuccessfulReturnStyle.
© Substring AG