Skip to content

Repricer Articles Endpoints

Base path: /api/v1/multi + router prefix /articles → full base: /api/v1/multi/articles

Summary: Core CRUD and orchestration endpoints for repricer Article objects. Provides listing, filtering, per-channel details (Shopify, FBM, Kaufland, Otto, FBA), UVP management (set/remove), and triggers to recalculate/export across channels.

Auth: Bearer JWT required for all endpoints.

Rate limiting: Subject to global rate limiter (250 requests / 60s).


Listing & querying

  • GET / — List articles with optional JSON filters and orders query params
  • Path: GET /api/v1/multi/articles/
  • Query params: filters (JSON array of filter objects), orders (JSON array of order objects), limit (int, default 100), offset (int)
  • details query param (enum) controls inclusion of channel-specific details: shopify, fbm, kaufland, otto, fba, pricing_history, all.
  • Response: List[RepricerArticleWithDetailsResponse]
  • Notes: Filters are applied by apply_filters_to_query; orders use apply_order_to_query.

  • GET /stats/summary — Returns aggregated counts and stock/value sums.


Article CRUD

  • GET /{sku} — Get an article (optionally with details)
  • POST / — Create an article (RepricerArticleCreate)
  • PUT /{sku} — Update an article (RepricerArticleUpdate) — triggers channel-specific recalculations for changed fields (stock, buy price, weight, package)
  • DELETE /{sku} — Remove an article

Notes: PUT may call channel recalculation helpers for Shopify, Kaufland, Otto, FBA, FBM depending on changed fields.


Channel details endpoints (per-SKU)

These endpoints allow managing per-channel detail objects. Each channel exposes GET, POST (create), PUT (update) and DELETE endpoints where applicable.

  • Shopify: /api/v1/multi/articles/{sku}/shopifyShopifyDetails CRUD; creating/updating triggers shopify_recalculate_articles.
  • FBM: /api/v1/multi/articles/{sku}/fbmFBMDetails CRUD; creating/updating triggers fbm_recalculate_articles.
  • Kaufland: /api/v1/multi/articles/{sku}/kauflandKauflandDetails CRUD; creating/updating triggers kaufland_recalculate_articles.
  • Otto: /api/v1/multi/articles/{sku}/ottoOttoDetails CRUD; creating/updating triggers otto_recalculate_articles.
  • FBA: /api/v1/multi/articles/{sku}/fbaFBADetails CRUD; creating/updating triggers fba_recalculate_articles.

Additionally, FBM details can be updated by ID (PUT /fbm/{fbm_id}) to support multi-FBM variants per base article.


UVP (manufacturer suggested price) endpoints

  • POST /{sku}/uvp — Apply UVP updates (UVPUpdate) to one or more channels and optionally push values into channel-specific price fields. Triggers downstream recalculations and updates.
  • DELETE /{sku}/uvp — Remove UVP settings (UVPRemove) and optionally revert channel pricing behavior (set use_min_max_rules=True).

Other utilities

  • Attach/detach pricing history: pricing_history detail source can be requested via details.
  • Package mapping helpers are used internally on PUT when weight/package changes to reassign package_type and package_cost.

Filtering & ordering examples

  • Example: Get active Shopify articles with stock > 0, ordered by shopify.price descending
curl "http://localhost:8000/api/v1/multi/articles/?filters=[{\"field\":\"stock\",\"op\":\"gt\",\"value\":0},{\"field\":\"shopify.price\",\"op\":\"is_not_null\"}]&orders=[{\"field\":\"shopify.price\",\"direction\":\"desc\"}]" \
    -H "Authorization: Bearer <TOKEN>"

Implementation notes

  • Implementation: backend/service_multi-repricer/app/api/v1/endpoints/repricer_articles.py
  • This module delegates heavy work to per-channel modules and to services.cron_service for scheduled workflows. It ensures normalized Pydantic responses and provides compatibility fallbacks when channel detail JSONs don't strictly match expected schemas.

  • Source: backend/service_multi-repricer/app/api/v1/endpoints/repricer_articles.py
  • Related: backend/service_multi-repricer/app/crud/repricer_article.py (data access helpers)

Generated: reference for core repricer endpoints and orchestration.