Skip to content

casoon/billbee.net

Repository files navigation

Billbee.Net

License: MIT .NET GitHub Release Date

A modern, asynchronous .NET 10 client library for the Billbee API. Built with Flurl.Http and Polly for robust, resilient HTTP communication.

Features

  • Async/Await — fully asynchronous API
  • Resilient — automatic retry and circuit breaker via Polly
  • Rate limiting — exponential backoff on HTTP 429
  • Dependency Injection — native Microsoft.Extensions.DependencyInjection support
  • Structured logging — configurable via Microsoft.Extensions.Logging
  • Strongly typed — full IntelliSense and XML documentation

Installation

dotnet add package Billbee.Net

Configuration

{
  "Billbee": {
    "Url": "https://app.billbee.io/api/v1",
    "ApiKey": "your-api-key",
    "Username": "your-username",
    "Password": "your-password",
    "Logging": false
  }
}

Registration

builder.Services.RegisterBillbee(builder.Configuration);

Usage

public class OrderService(IOrderEndpoint orders)
{
    public Task<List<Order>> GetRecentAsync() =>
        orders.GetAllAsync(orderStateId: [OrderStateEnum.Im_Fulfillment]);

    public async Task<Order> GetAsync(long id)
    {
        try
        {
            return await orders.GetAsync(id);
        }
        catch (ApiException ex)
        {
            _logger.LogError(ex, "Failed to get order {Id}", id);
            throw;
        }
    }
}

Available Endpoints

  • Orders — retrieve, create, update, manage orders
  • Products — product catalog and stock management
  • Customers — customer data and addresses
  • Invoices — invoice generation
  • Shipments — shipping and tracking
  • Events — custom event handling
  • Delivery Notes — delivery documentation

Requirements

  • .NET 10.0
  • Billbee API credentials (API Key, Username, Password)

Building & Testing

dotnet restore
dotnet build
dotnet test

API Documentation

Billbee API Documentation

License

MIT — see LICENSE for details.

Author

Jörn Seidel · casoon.de · info@casoon.de

About

A modern, asynchronous .NET client library for the Billbee API with built-in resilience patterns, comprehensive logging, and full async/await support.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors