Skip to main content
The Offer module owns a seller’s listing — the binding of a shared product variant to that seller’s SKU, shipping profile, price, and inventory. Products in Mercur are master catalog records; the offer is what makes a variant purchasable from a specific seller.

Data models

Offer

Table offer, ID prefix offer. Unique on (seller_id, sku).
FieldTypeNotes
seller_idtextThe listing seller
product_idtextThe master product
variant_idtextThe listed variant
shipping_profile_idtextThe seller’s shipping profile for this offer
skutextSearchable; unique per seller
ean / upctextNullable, searchable
created_bytextActor that created the offer
variant_countnumberComputed; only populated in group_by_seller mode
metadatajsonNullable
Indexes exist on variant_id, product_id, seller_id, shipping_profile_id, ean, and upc. Prices and inventory attach to the offer through links, not columns:
Linked entityCardinalityPurpose
Pricing.priceone offer — many pricesThe offer’s own price set
Inventory.inventoryItemmany-to-many (offer_inventory_item, with required_quantity, default 1)The stock backing the offer
Cart.lineItem / Order.orderLineItemone offer — many itemsTraces cart and order lines back to the offer they were bought from
Product.product / productVariant, Seller, Fulfillment.shippingProfileread-onlyResolved from the *_id columns
Offer inventory links to the offer, not the variant. For offer-backed order lines, variant.inventory_items is empty — always read stock through the offer’s inventory link.

Service

OfferModuleService extends MedusaService with auto-generated CRUD, plus a grouped listing mode:
MethodBehavior
listOffers(filters, config) / listAndCountOffers(...)When filters.group_by_seller is set, collapses results to one row per (product_id, seller_id) and computes variant_count per group; otherwise standard listing
  • GET /admin/offers, POST /admin/offers/batch — operator visibility and bulk creation
  • GET/POST /vendor/offers, POST /vendor/offers/batch, POST /vendor/offers/:id/inventory-items/batch — seller listing management
  • GET /store/offers, GET /store/offers/:id — storefront discovery with per-offer calculated prices

Next steps

Seller module

Search module