Вышел Модуль интеграций 2.0 для MedusaЧитать анонс
Athos plugin logo

Athos plugin

Плагин интеграции Athos для Medusa.

npm install @weareseeed/medusa-athos-plugin
Категория
Создано
Сервис
Версия
0.0.10
Последнее обновление
5 месяцев назад
Ежемесячные загрузки
Загрузка данных

@weareseeed/medusa-athos-plugin

Medusa v2 plugin that generates a streaming NDJSON product feed for Athos Commerce integration.

Features

  • Streaming NDJSON product feed (one line per variant + one product summary line)
  • Token-based feed authentication
  • Price filtering by region
  • Product filtering by sales channel
  • Configurable swatch options
  • Extensible via and hooks
  • Admin API to manage plugin configuration

Requirements

  • Medusa v2
  • Node.js >= 20

Installation

Setup

1. Register the plugin

2. Run migrations

npx medusa db:migrate

3. Configure via Admin API

Set the plugin configuration through the authenticated admin endpoint:

FieldTypeRequiredDescription
YesBase URL prepended to for each product URL
YesSecret token required to access the feed endpoint
NoWhen set, prices are filtered to the region's currency
NoWhen set, only products in these sales channels are included
NoOption titles treated as swatches (default: )

Feed Endpoint

GET /athos/feed?token=<feed_token>

Returns an stream. Each product produces:

  1. One variant line per variant
  2. One product summary line

Variant line fields

FieldDescription
Variant ID
Variant SKU
Variant title
Lowest price for the variant (filtered by region if configured)
Product thumbnail
Product description
Array of category path strings (e.g. )
Array of category IDs
Comma-separated product tags
Parent product ID
Parent product title
Parent product thumbnail
1-based position within the product
if the variant is available
% of variants in stock across the product
All product options with positions and values
This variant's chosen option values
Values of configured swatch options (product-level)

Product summary line fields

Same as variant line minus all private fields, with set to the product ID and set to the lowest price across all variants.

Example

Plugin Options

Pass options when registering the plugin in to extend the feed.

— Additional Medusa product fields to fetch and make available inside . Uses the same dot-notation field paths as Medusa's .

Called for every line written to the feed. Use it to add, remove, or transform fields. The argument provides typed access to the raw product and variant data:

Fields that resolve to are automatically stripped from the output.

Admin API

Both endpoints require an authenticated admin JWT.

MethodPathDescription
Retrieve the current configuration
Create or update the configuration

License

MIT — Seeed