• Сообщество
  • Блог
Документация
Плагины и интеграцииВсе расширения для Medusa от сообществаСтартерыЗапускайте проекты быстрее с готовыми решениями
ЭкспертыПодберите специалиста для разработки и развития вашего проекта на MedusaКейсыПосмотрите примеры Medusa в продакшене и успешные внедрения
Меч Moscow
Комплексная e-commerce платформа на Medusa для московского fashion-бренда

Меч Moscow · Fashion

Gorgo снижает затраты на адаптацию Medusa к локальным рынкам.

Мы разрабатываем плагины интеграции, осуществляем поддержку и развиваем сообщество разработчиков на Medusa в Telegram.

  • Ресурсы Medusa
  • Плагины и интеграции
  • Стартеры
  • Эксперты
  • Кейсы
  • Medusa Чат в Telegram
  • Medusa Новости в Telegram
  • Документация Gorgo
  • Связаться с нами
  • TelegramGitHub
Плагины
P

Pos

Medusa v2 plugin providing optimized POS endpoints

npm install @narisolutions/medusa-plugin-pos
Категория
Другое
Создано
Narisolutions
Версия
0.1.2
Последнее обновление
4 недели назад
Ежемесячные загрузки
Загрузка данных
Звезды на Github
3
npmNPMGitHubGithub

@narisolutions/medusa-plugin-pos

Medusa v2 plugin that adds the product endpoints any POS (Point of Sale) app needs. Built by Nari Solutions.

Without these custom endpoints, a POS talking to Medusa's generic API has two problems: stock isn't checked automatically when adding items to a cart, and prices come back raw — not context-calculated. This plugin's endpoints return live inventory quantities per variant and context-calculated prices (), plus a option to choose exactly which product fields you fetch.

Requirements

  • Medusa v2 ≥ 2.15.0 ( and are peer dependencies)
  • Node.js ≥ 20

Installation

yarn add @narisolutions/medusa-plugin-pos

Setup

Add the plugin to your :

1import PosPlugin from "@narisolutions/medusa-plugin-pos"
2
3export default defineConfig({
4 plugins: [
5 PosPlugin({
6 defaultCurrencyCode: "usd", // optional — used when ?currency_code= is omitted
7 rateLimit: { // optional — per-IP rate limiting
8 windowMs: 60_000, // 1 minute window
9 max: 100, // max requests per window
10 },
11 }),
12 ],
13})

API Documentation

  • — endpoint reference with rationale and retirement criteria
  • — OpenAPI 3.1 spec (parameters, schemas, status codes)

Endpoints

All endpoints require an admin bearer token ().

GET

Returns all published products for a sales channel, with inventory quantities per variant.

Query paramTypeDescription
stringInclude for each variant
stringComma-separated extra fields appended to the default field list

The default field list covers core product/variant fields. Fields like are not included by default — opt in via .

Response: array of product objects.


GET

Looks up a single product by barcode value, with inventory quantities.

The path parameter is matched first against the variant field, then falls back to the field. This means physical barcodes stored in work out of the box — is the fallback for stores that populate that field instead.

Query paramTypeDescription
stringInclude for each variant
stringComma-separated extra fields appended to the default field list (e.g. )

Response: single product object. Returns if no variant matches either field.


GET

Returns . Requires auth. Use for backend health checks from your POS.

Authentication

Obtain a bearer token from the Medusa admin auth endpoint:

1POST /auth/user/emailpass
2{ "email": "...", "password": "..." }

Use the returned token as on all requests.

Frontend usage (example)

1const res = await fetch(
2 `/pos/products/${salesChannelId}?currency_code=usd`,
3 { headers: { Authorization: `Bearer ${token}` } }
4)
5const products = await res.json()
1const res = await fetch(
2 `/pos/product-by-barcode/${salesChannelId}/${ean}?currency_code=usd`,
3 { headers: { Authorization: `Bearer ${token}` } }
4)
5const product = await res.json()

Plugin options

OptionTypeDefaultDescription
Fallback currency code when is not passed
—Rate limit window in milliseconds
—Max requests per IP per window

License

Apache-2.0

Еще в этой категории

Посмотреть все
Другое
Gati logo

Gati

От Devx Commerce

Синхронизируйте Medusa с Gati ERP

Загрузка данных
npm
Другое
Product Reviews logo

Product Reviews

От Lambda Curry

Добавляйте рейтинги, отзывы и модерацию товаров

Загрузка данных
GitHubnpm
Другое
Variant Images logo

Variant Images

От Betanoir

Организуйте и загружайте варианты изображений в Medusa

Загрузка данных
GitHubnpm