Skip to content

1.5.0

🚀 New Features

  • New FBA Articles management page in the frontend for real-time FBA inventory, pricing, and margin insights.
  • Dedicated FastAPI router (/api/v1/multi/fba/articles) for FBA article operations: sync, recalc, and export.
  • Full backend support for FBA article lifecycle: fetch, sync, recalc, and export, with robust async background processing.
  • New database table fba_details with ASIN, seller_sku, product_url, international_pricing (JSONB), and all Amazon FBA fee fields, plus indices for fast lookup.
  • Sellerlogic API integration for fetching FBA product and stock data, with automatic merging into local DB for both new and existing articles.
  • Amazon SP-API integration for live fee estimation and margin calculation, including all relevant FBA fees (fulfillment, storage, referral, closing, giftwrap, and other Amazon fees).
  • All FBA fee fields (including max_ variants) are now included in the API output for transparency and debugging.
  • Robust retry logic for Amazon SP-API fee estimation (up to 10 attempts) to ensure reliable and accurate margin/profit calculations, never returning fallback values unless all retries fail.
  • Storage fee logic adapts by month (0.01 Jan–Sep, 0.02 Oct–Dec) and applies a 2% surcharge for ES/IT marketplaces.

🔧 Improvements

  • Improved error handling and logging for Sellerlogic and Amazon API calls, with clear warnings and error messages for all failure cases.
  • More robust mapping and updating of base articles and FBA details, including correct handling of ASIN, seller_sku, and article_id relationships.
  • Fixed and improved stock update logic: stock from Sellerlogic is now always merged and persisted for both new and existing articles.
  • Enhanced margin calculation logic: all relevant fees are included, and margin/profit is only calculated with valid, non-fallback fee data.
  • Improved frontend FBA page: displays all fee fields, margin, and profit, and provides clear error states if data is missing or API calls fail.
  • Added endpoints for batch export and recalc of FBA articles, with status tracking and error reporting.
  • SQL migration scripts for new FBA tables and indices, with documentation in patchnotes and migration guides.

🐛 Bug Fixes

  • Fixed issue where stock was not updated for existing articles during FBA sync (now always merged and committed).
  • Fixed UnboundLocalError and improved lookup logic for base articles (robust handling of article_id and seller_sku).
  • Prevented fallback/empty fee values from being returned unless all Amazon API retries are exhausted (protects margin/profit accuracy).
  • Fixed frontend/backend mismatches in FBA data structure and API output (now fully aligned).
  • Improved error propagation and logging for all Sellerlogic and Amazon API failures.

SQL

Run update script to add new table, postgres/updates/fba_details.sql:

CREATE TABLE fba_details ( article_id INTEGER NOT NULL, seller_sku VARCHAR, asin VARCHAR, -- Neue Spalte product_url VARCHAR, margin_rule_id INTEGER, use_min_max_rules BOOLEAN NOT NULL DEFAULT TRUE, expected_profit DECIMAL(10, 2), status VARCHAR, error_message TEXT, category VARCHAR, international_pricing JSONB, updated_at TIMESTAMP WITH TIME ZONE NOT NULL, PRIMARY KEY (article_id), CONSTRAINT fk_repricer_articles FOREIGN KEY (article_id) REFERENCES repricer_articles (id) );

-- Indizes für schnelle Abfragen CREATE INDEX ix_fba_details_article_id ON fba_details (article_id); CREATE INDEX ix_fba_details_margin_rule_id ON fba_details (margin_rule_id); CREATE INDEX ix_fba_details_asin ON fba_details (asin); -- Index für die ASIN