Systeme Electric connector

backend/internal/core/ingestion/infra/systeme — третий адаптер supplier-connector контракта (ADR-0024). Iter-1 использует BulkSnapshotPipeline (catalog/prices/stock через paged/batch endpoints). Cursor retrofit на iso_date запланирован (см. tracium_path_to_launch.md).

Подробная спецификация — в connectors/systeme/spec.md, mapping — в connectors/systeme/mapping.md, rate budget — в connectors/systeme/rate-budget.md.

Transport + endpoints

REST/JSON. Endpoints под /new-api/JSON/:

PathPurpose
GET /new-api/JSON/getdatacatalog + characteristics (full snapshot, paged)
GET /new-api/JSON/getpriceprices (default Moscow rates)
GET /new-api/JSON/getekaterinburgpriceрегиональный override (через PriceMethod)
GET /new-api/JSON/getstockdiagnostic/per-SKU stock
GET /new-api/JSON/getstockallscheduled full all-warehouses stock snapshot

Auth: query parameter accessCode=<token> на каждом запросе. Никакого login flow — токен выдаётся Systeme Electric из их кабинета (Developers → API).

Auth

AuthSchemeAPIToken в cabinet supplier_catalog: customer вводит API token в одно поле «API token». Backend хранит как secret_value JSON {api_token}. SessionManager не делает сетевых вызовов — просто прокидывает accessCode в query.

Capabilities (systeme/capabilities.go)

AxisValue
TransportREST
PriceSetNet only
Stocktrue; StockForecast: false
Mediaimages + videos + certificates (no watermark)
Marketplacefalse
IncrementalSyncSupported=false (cursor retrofit planned)
ScheduledRefresh.Catalogpaged
ScheduledRefresh.Pricesbatch by commercialRef for the current catalog page
ScheduledRefresh.Stockfull export (getstockall)
ScheduledRefresh.Specspaged
MultiCurrencyRUB only

UsesBulkSnapshot()=true ⇒ orchestrator маршрутизирует Systeme через BulkSnapshotPipeline.

Session + rate-limit

  • SessionManager.Acquire возвращает SessionHandle с accessCode в Opaque, без сетевого вызова. ValidUntil = +100 лет.
  • Rate-limit headers поставщика — Retry-After (signal’ом для RateLimited error code).
  • Запрос всегда GET; query string содержит accessCode; commercialRef добавляется только для diagnostic/per-SKU lookup. Scheduled stock refresh не передает commercialRef, а забирает полный getstockall.

Scheduled refresh strategy

systeme intentionally runs stock before catalog:

  1. getstockall is fetched once for all warehouses.
  2. Rows with any positive stocks[].count are emitted immediately as stock-only observations. This keeps customer availability current even when the full catalog still has many pages left.
  3. Catalog rows are streamed page-by-page from getdata.
  4. For each catalog page, getprice is called once with a comma-separated commercialRef batch for only that page’s SKU list.
  5. Catalog observations still include the matching stock row when it is present, and empty stock when getstockall completed and the SKU has no stock row.

The stock-only pass deliberately does not wait for catalog enrichment. It may create/update a minimal supplier offer named by SKU; later catalog pages enrich the same supplier SKU with name, brand, media, categories, and characteristics.

Особенности

  • Нет login flow — Basic Auth-аналог через query, простой SessionManager.
  • Региональные ценыgetekaterinburgprice отдельный endpoint. PriceMethod в config’е выбирает default. Multi-region проекты используют per-region credentials или iter через price-methods.
  • Live contract 2026-05-07getstockall вернул 30051 rows (~10.8 MB); commercialRef встречается и string, и number, stocks[].count приходит string. В реальном smoke из 54407 warehouse rows положительными были 16768, что соответствует 12018 SKU с наличием. getprice?commercialRef=a,b,c возвращает неполное пересечение для batch-list, поэтому отсутствие цены для конкретного SKU в batch является допустимым состоянием, а не ошибкой всего тика.
  • No native ETIM coding — Systeme отдаёт собственные ETIM-7 references? (TBD для cycle следующего после auto-classification).

Roadmap

  • Cursor retrofit — Systeme имеет since или ISO-date semantics в getdata payload (TBD). IncrementalSync.Kind=date_based после retrofit. ~15-20 commits.
  • Region matrix — поддержка нескольких регионов одновременно (Moscow + Ekaterinburg + …). Сейчас один region на credential.

Связанные документы