Small Business: Admin API
Small Business §19 UStG for Shopware 6.7 - the two Admin API routes for migration status and migration to the 0% tax rate, with permissions, request and response format.
Small Business: Admin API
The plugin adds two routes to the Admin API. The migration card in the admin uses them. You can also call them yourself with an Admin API token.
| Method | Path | Purpose | Required permissions |
|---|---|---|---|
GET |
/api/_action/mmd-kleinunternehmer/migration-status |
Number of products still to migrate and already migrated | product:read |
POST |
/api/_action/mmd-kleinunternehmer/migrate-to-small-business |
Migrate all products to the 0% tax rate | product:update, system_config:read |
There is no route for restoring. That is only possible through the CLI command.
Migration status
Response when the tax rate exists:
{
"success": true,
"productsToMigrate": 12,
"productsOnSmallBusiness": 340,
"smallBusinessTaxId": "0190..."
}
If the tax rate Kleinunternehmer §19 UStG (0%) is missing, the route answers with HTTP 200 and {"success": false, "error": "Small business tax rule not found. Please activate the plugin first."}.
Run the migration
The call needs no body. The route migrates all products that are not on the 0% tax rate using the same price logic as the CLI command, in steps of 100.
| Case | HTTP status | Response |
|---|---|---|
| Products migrated | 200 | {"success": true, "migratedCount": <count>, "message": "Successfully migrated <count> products to 0% tax rate."} |
| Nothing to migrate | 200 | {"success": true, "migratedCount": 0, "message": "All products are already using the small business tax rate."} |
| Tax rate missing | 400 | {"success": false, "error": "Small business tax rule not found."} |
The route runs synchronously within the request. With very large catalogs this can hit server time limits, which is what the CLI command is for.