AllegroApi 2.0.0

dotnet add package AllegroApi --version 2.0.0
                    
NuGet\Install-Package AllegroApi -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AllegroApi" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AllegroApi" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="AllegroApi" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AllegroApi --version 2.0.0
                    
#r "nuget: AllegroApi, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AllegroApi@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AllegroApi&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=AllegroApi&version=2.0.0
                    
Install as a Cake Tool

Unofficial Allegro .NET SDK

NuGet Downloads License: GPL v3
CI Build and Test (Multi-OS)

A modern .NET client library for the Allegro REST API. This SDK provides strongly-typed access to over 170 API endpoints across 35 specialized clients, covering 95% of the Allegro marketplace platform.

Note: This is an unofficial, community-maintained SDK. It is not officially endorsed or supported by Allegro.

Key Features

Comprehensive Coverage - Access to 170+ API endpoints organized into 35 specialized clients covering offers, orders, fulfillment, shipping, payments, and more.

Developer Experience - Strongly typed requests and responses with full IntelliSense support, making integration straightforward and reducing errors.

Modern Async - All API calls use async/await patterns for efficient resource usage in high-throughput applications.

Production Ready - Includes automatic retry logic with exponential backoff, 11 specialized exception types for error handling, and extensive test coverage.

Multi-Environment - Seamlessly switch between production and sandbox environments for testing without code changes.

📦 Installation

dotnet add package AllegroApi

🚀 Quick Start

using AllegroApi;

// Production environment
var client = AllegroApiClient.CreateProduction("your-access-token");

// Get categories
var categories = await client.Categories.GetCategoriesAsync();

// Search products
var products = await client.Products.SearchProductsAsync(new ProductSearchParams 
{ 
    Phrase = "laptop" 
});

// Create an offer
var offer = await client.Offers.CreateProductOfferAsync(new SaleProductOfferRequestV1
{
    // ... offer details
});

// Get orders
var orders = await client.Orders.GetOrdersAsync(new OrderSearchParams());

📚 API Coverage (170+/180 Endpoints = 95%)

✅ Fully Implemented Categories (35 Specialized Clients)

Category Methods Status
Offer Management 17 ✅ Complete
Products 5 ✅ Complete
Categories 4 ✅ Complete
Orders 7 ✅ Complete
Fulfillment 17 ✅ Complete - ASN, Stock, Parcels, Tax IDs
Images & Attachments 6 ✅ Complete - Upload, Offer Attachments
Shipping & Delivery 7 ✅ Complete
After-Sales Services 12 ✅ Complete
Payments 2 ✅ Complete
Billing 3 ✅ Complete
Messaging 5 ✅ Complete
User Ratings 5 ✅ Complete
Disputes & Attachments 7 ✅ Complete - Includes binary file handling
Points of Service 5 ✅ Complete
Shipment Management 13 ✅ Complete
Customer Returns 3 ✅ Complete
Batch Operations 9 ✅ Complete
Listing & Discovery 4 ✅ Complete - Public offer search
Badge Campaigns 6 ✅ Complete
Classifieds 4 ✅ Complete
Advanced Features 30+ ✅ Variants, Tags, Bundles, Services
EU Compliance 10 ✅ Responsible Persons/Producers (GPSR)

🎯 Core Capabilities

Offer Management

// Create, update, delete offers
await client.Offers.CreateProductOfferAsync(request);
await client.Offers.UpdateOfferAsync(offerId, request);
await client.Offers.DeleteOfferAsync(offerId);

// Search and filter offers
await client.Offers.SearchOffersAsync(new OfferSearchParams
{
    Name = "iPhone",
    PublicationStatus = new[] { "ACTIVE" }
});

// Batch operations
await client.BatchOperations.BatchPriceUpdateAsync(commands);

Product & Category Management

// Search products by EAN/phrase
var products = await client.Products.SearchProductsAsync(
    new ProductSearchParams { Ean = "1234567890123" }
);

// Get category tree
var categories = await client.Categories.GetCategoriesAsync();
var params = await client.Categories.GetCategoryParametersAsync(categoryId);

Order Processing

// Get orders
var orders = await client.Orders.GetOrdersAsync(new OrderSearchParams
{
    Status = "READY_FOR_PROCESSING"
});

// Get order details
var order = await client.Orders.GetOrderAsync(orderId);

// Update fulfillment
await client.Orders.UpdateFulfillmentStatusAsync(orderId, request);

Image Management

// Upload from URL
var image = await client.Images.UploadImageFromUrlAsync(imageUrl);

// Upload from file
byte[] imageData = File.ReadAllBytes("photo.jpg");
var response = await client.Images.UploadImageAsync(imageData, "image/jpeg");

🛡️ Error Handling

The library provides specialized exceptions for precise error handling:

try
{
    var offer = await client.Offers.GetProductOfferAsync(offerId);
}
catch (AllegroNotFoundException)
{
    // 404 - Resource not found
}
catch (AllegroBadRequestException ex)
{
    // 400 - Validation errors
    foreach (var error in ex.Errors)
    {
        Console.WriteLine($"{error.Path}: {error.Message}");
    }
}
catch (AllegroRateLimitException ex)
{
    // 429 - Rate limit exceeded
    await Task.Delay(TimeSpan.FromSeconds(ex.RetryAfterSeconds));
}
catch (AllegroAuthenticationException)
{
    // 401 - Invalid token
}

All Exception Types:

  • AllegroAuthenticationException (401)
  • AllegroAuthorizationException (403)
  • AllegroNotFoundException (404)
  • AllegroBadRequestException (400)
  • AllegroUnprocessableEntityException (422)
  • AllegroConflictException (409)
  • AllegroRateLimitException (429)
  • AllegroServerException (5xx)
  • AllegroNetworkException
  • AllegroTimeoutException

⚙️ Configuration

// Simple setup
var client = AllegroApiClient.CreateProduction("your-token");

// Advanced configuration
var options = new AllegroApiOptions
{
    AccessToken = "your-token",
    BaseUrl = "https://api.allegro.pl",
    TimeoutSeconds = 100,
    MaxRetryAttempts = 3,
    RetryDelayMilliseconds = 1000,
    AcceptLanguage = "en-US" // pl-PL, en-US, uk-UA, cs-CZ, sk-SK, hu-HU
};
var client = new AllegroApiClient(options);

// With dependency injection
services.AddSingleton(new AllegroApiOptions { AccessToken = "token" });
services.AddSingleton<AllegroApiClient>();

📋 Requirements

📄 License

GPL-3.0-or-later - See LICENSE for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Made with ❤️ for the Allegro developer community

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 1,364 10/14/2025

# Release Notes - Unofficial Allegro .NET SDK

> **Note:** This is an unofficial, community-maintained SDK. It is not officially endorsed or supported by Allegro.

## Version 2.0.0 (January 2025)

This is a major version release with significant improvements and new features.

### What's New

- Major version bump to 2.0.0
- Enhanced stability and performance
- Improved documentation
- Updated dependencies to latest versions

### Breaking Changes

Please review your code when upgrading from v1.x to v2.0.0.

### Technical Details

- All features from v2.0.0 are included
- Production-ready for .NET 8.0+
- 170+ endpoints across 35 specialized clients

---

## Version 2.0.0 (October 14, 2025)

This release focuses on warehouse management and marketplace features, bringing API coverage to 95%.

### What's New

**Fulfillment Support**  
Added comprehensive support for Allegro Fulfillment through the new `FulfillmentClient` (17 methods):
- Create and manage Advance Ship Notices (ASN)
- Track inventory with filtering and sorting
- Retrieve order parcels and available products
- Configure tax IDs for international shipping
- Set removal preferences

**Marketplace Features**  
Three new clients provide access to promotional and discovery tools:
- `ListingClient` - Search public offers by phrase, category, or seller (4 methods)
- `BadgesClient` - Create and manage badge campaigns (6 methods)
- `ClassifiedsClient` - Handle classifieds packages and assignments (4 methods)

**Enhanced Communication**  
- `DisputeAttachmentsClient` - Upload and download binary files for disputes (3 methods)
- Extended `SaleExtensionsClient` with additional service management (6 methods)
- Extended `AdvancedOffersClient` with offer attachment support (3 methods)
- Added fundraising campaign search to `MiscellaneousClient`

### Improvements

- API coverage increased from 86% to 95% (170+ of 180 endpoints)
- Added 44 new API methods across 5 new clients
- Extended `AllegroHttpClient` with binary data handling methods
- Expanded test suite to over 200 unit tests
- Complete XML documentation for all new APIs

### Technical Details

**New Clients:**
- FulfillmentClient: 17 methods
- ListingClient: 4 methods  
- BadgesClient: 6 methods
- ClassifiedsClient: 4 methods
- DisputeAttachmentsClient: 3 methods

**Extended Clients:**
- SaleExtensionsClient: +6 methods
- AdvancedOffersClient: +3 methods
- MiscellaneousClient: +1 method

**Totals:**
- Methods: 150 → 170+ (+20)
- Clients: 30 → 35 (+5)
- Model Classes: +80

### Compatibility

This release is fully backward compatible with v1.4.0. No code changes are required when upgrading.

## Version 1.4.0 (October 2025)

### New Features
- ✨ Added Compatibility List management (4 new methods) - Essential for automotive parts sellers
- ✨ Added Offer Events monitoring - Real-time tracking of offer changes
- ✨ Added CPS Conversions tracking - Affiliate program support
- ✨ Added Deposit Types retrieval
- ✨ Added Auction Bidding support
- ✨ Added Matching Categories with scoring

### Improvements
- 🎯 Increased API coverage from 81% to 86% (150/174 endpoints)
- 🐛 Fixed all build warnings - now 0 errors, 0 warnings
- ✅ All 105 unit tests passing (100%)
- 📝 Enhanced XML documentation for all new methods
- 🚀 Added 9 new model classes for new endpoints

### API Coverage
- **MiscellaneousClient:** 5 → 14 methods (+9)
- **ProductClient:** 4 → 5 methods (+1)
- **Total Methods:** 141 → 150+ (+9)

## Version 1.3.0 (October 2025)

### New Features
- Added Post-Purchase Issues management (5 methods)
- Added Refund Claims management (4 methods)
- Added Additional Emails management (4 methods)
- Added Contacts management (5 methods)
- Added Size Tables management (4 methods)
- Added Responsible Persons/Producers clients (GPSR compliance)

### Improvements
- Increased API coverage to 81%
- Added 34 new methods
- Enhanced order management capabilities

## Version 1.2.0 (October 2025)

### New Features
- Added Shipment Management (13 methods) - Create shipments, labels, protocols, pickups
- Added Batch Operations (9 methods) - Bulk price/quantity/modification changes
- Added Customer Returns (3 methods)

### Improvements
- Increased API coverage to ~75%
- Added 25 new methods
- Improved logistics capabilities

## Version 1.1.0 (October 2025)

### New Features
- Added After-Sales Services (12 methods) - Return policies, warranties, implied warranties
- Added Points of Service (5 methods) - Pickup locations
- Added User Ratings (5 methods) - Reputation management
- Added Messaging (5 methods) - Buyer-seller communication
- Added Disputes management (4 methods)

### Improvements
- Increased API coverage to ~65%
- Added 31 new methods
- Enhanced customer service capabilities

## Version 1.0.0 (October 2025)

### Initial Release
- 🎉 Core API implementation with 82 methods
- ✅ Offer Management (17 methods)
- ✅ Product Management (2 methods)
- ✅ Order Management (2 methods)
- ✅ Category Management (3 methods)
- ✅ Image Upload (3 methods)
- ✅ Pricing & Fees (1 method)
- ✅ Shipping & Delivery (7 methods)
- ✅ Payments & Billing (5 methods)
- 🛡️ 11 specialized exception types
- 🔄 Built-in retry logic with exponential backoff
- 📝 Full XML documentation
- ✅ 70+ unit tests