Medusa v2 plugin providing optimized POS endpoints
Medusa v2 plugin that adds the product endpoints a POS (Point of Sale) app needs. Built by Nari Solutions specifically for Medusa POS — it is the backend half of that app.
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.
This plugin exists to serve narisolutions/medusa-pos. Its endpoints, response shapes, and options are designed around what that app consumes — install it on the Medusa backend that Medusa POS points at.
It has no dependency on the POS app itself, so the endpoints work for any client that wants stock-aware, price-calculated product data. Just be aware that the API is shaped by Medusa POS's needs and follows its requirements.
Add the plugin to your :
All endpoints require an admin bearer token ().
Returns all published products for a sales channel, with inventory quantities per variant.
| Query param | Type | Description |
|---|---|---|
| string | Include for each variant | |
| string | Comma-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.
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 param | Type | Description |
|---|---|---|
| string | Include for each variant | |
| string | Comma-separated extra fields appended to the default field list (e.g. ) |
Response: single product object. Returns if no variant matches either field.
Returns . Requires auth. Use for backend health checks from your POS.
Obtain a bearer token from the Medusa admin auth endpoint:
Use the returned token as on all requests.
| Option | Type | Default | Description |
|---|---|---|---|
| Fallback currency code when is not passed | |||
| — | Rate limit window in milliseconds | ||
| — | Max requests per IP per window |
Apache-2.0
yarn add @narisolutions/medusa-plugin-pos1import PosPlugin from "@narisolutions/medusa-plugin-pos"2
3export default defineConfig({4 plugins: [5 PosPlugin({6 defaultCurrencyCode: "usd", // optional — used when ?currency_code= is omitted7 rateLimit: { // optional — per-IP rate limiting8 windowMs: 60_000, // 1 minute window9 max: 100, // max requests per window10 },11 }),12 ],13})1POST /auth/user/emailpass2{ "email": "...", "password": "..." }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()