C# Kaufland API Integration Enhancement

Job ID: 39296236

Budget: €750 – €1,500 EUR

? Goal
Develop a self-contained Kaufland module for the middleware, consisting of:

1. A C# class `KauflandConnector` to connect with the Kaufland Seller API.
https://sellerapi.kaufland.com/?page=rest-api
2. A graphical user interface (GUI) for configuring this marketplace account.

? Architectural Guidelines

- `KauflandConnector` inherits from an abstract base class `MarketplaceConnector`.
- Must not access the database directly.
- All data is passed to the Windows Service for further processing.
- Returns only standardized DTOs like `ProductDto`, `OrderDto`, `ShippingUpdateDto`.
- Internal models, helpers, and DTOs are allowed and encouraged for organization.

⚙️ Technology & Development Standards

- Target Framework: .NET 9 (net9.0)
- Language: C# 13
- UI Platform: Windows Desktop (WPF recommended, or modern WinForms)
- API communication: via HttpClient / HttpClientFactory
- JSON handling: System.Text.Json (preferred) or Newtonsoft.Json
- Logging: Return messages/errors to caller only (no file/db logging)
- Architecture: Clean Code, SOLID principles, no legacy technologies
- Unit testing (optional): xUnit or MSTest

? Backend Class: KauflandConnector

Methods to be implemented:
- List<ProductDto> SyncProducts()
- List<OrderDto> SyncOrders()
- void SyncShippingStatus(List<ShippingUpdateDto> updates)
- bool TestConnection()

Authentication via HTTP headers:

apiKey: your_api_key
apiSecret: your_api_secret

?️ GUI Component: Kaufland Configuration

- Windows interface for user configuration of Kaufland account settings.
- Built with WPF or modern WinForms in .NET 9.
- Integrated into main middleware settings panel or tab.

Required GUI Fields:

- API Key and Secret
- Sync interval (in minutes)
- Enable/Disable account
- Price markup (percentage)
- Delivery time (in days)
- Default shipping provider
- Minimum stock threshold (optional)
- Maximum stock limit (optional)
- Test connection button
- Save settings

?️ Stock Logic (Optional but Recommended)

Filtering logic to be implemented in SyncProducts():
if (product.Stock < config.MinStock) return;
if (config.MaxStock.HasValue && product.Stock > config.MaxStock.Value)
product.Stock = config.MaxStock.Value;
? Example Configuration JSON
{
"ApiKey": "abc123",
"ApiSecret": "xyz789",
"SyncIntervalMinutes": 5,
"Active": true,
"MinStock": 2,
"MaxStock": 20,
"DefaultShippingProvider": "DHL",
"PriceMarkupPercent": 10,
"DeliveryTimeDays": 2
}

? Deliverables

- `KauflandConnector.cs`: Implements REST integration
- `Models/`: Optional internal DTOs
- `Api/KauflandApiClient.cs`: Optional API handler class
- `Config/KauflandConfig.cs`: Serializable config structure
- `WPF UserControl` or `Form`: GUI for configuration
- `README.md`: Short implementation guide

? Summary

- The Kaufland module consists of an API connector and configuration UI.
- It integrates into the middleware via `MarketplaceConnector`.
- No direct DB access allowed.
- Uses latest .NET standards and architecture principles.
- Ready for runtime usage in the full middleware system.
Related categories: .NET C# Programming WPF ASP.NET Microsoft SQL Server