@mercurjs/docs 2.2.1 → 2.3.0-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/content/home.mdx +107 -0
  2. package/content/learn/architecture.mdx +168 -83
  3. package/content/learn/introduction.mdx +161 -56
  4. package/content/learn/migration-to-2-0.mdx +187 -0
  5. package/content/learn/why-mercur.mdx +91 -0
  6. package/content/platform/attribute/concepts/attribute-types.mdx +59 -0
  7. package/content/platform/attribute/concepts/global-vs-inline.mdx +50 -0
  8. package/content/platform/attribute/concepts/variant-axes.mdx +61 -0
  9. package/content/platform/attribute/guides/attach-attributes-to-a-product.mdx +69 -0
  10. package/content/platform/attribute/guides/create-a-variant-axis.mdx +83 -0
  11. package/content/platform/attribute/guides/create-an-attribute.mdx +81 -0
  12. package/content/platform/attribute/overview.mdx +87 -0
  13. package/content/platform/attribute/reference/data-models.mdx +56 -0
  14. package/content/platform/attribute/reference/events.mdx +41 -0
  15. package/content/platform/attribute/reference/links.mdx +45 -0
  16. package/content/platform/attribute/reference/service.mdx +49 -0
  17. package/content/platform/attribute/reference/workflows.mdx +45 -0
  18. package/content/platform/catalog/concepts/master-products.mdx +54 -0
  19. package/content/platform/catalog/concepts/product-seller-allowlist.mdx +48 -0
  20. package/content/platform/catalog/concepts/status-lifecycle.mdx +58 -0
  21. package/content/platform/catalog/concepts/variants-categories-collections.mdx +49 -0
  22. package/content/platform/catalog/guides/allowlist-stores.mdx +59 -0
  23. package/content/platform/catalog/guides/create-a-master-product.mdx +70 -0
  24. package/content/platform/catalog/guides/publish-or-reject-a-product.mdx +79 -0
  25. package/content/platform/catalog/overview.mdx +90 -0
  26. package/content/platform/catalog/reference/data-models.mdx +66 -0
  27. package/content/platform/catalog/reference/events.mdx +41 -0
  28. package/content/platform/catalog/reference/links.mdx +44 -0
  29. package/content/platform/catalog/reference/service.mdx +52 -0
  30. package/content/platform/catalog/reference/workflows.mdx +40 -0
  31. package/content/platform/commission/concepts/order-commission-lines.mdx +65 -0
  32. package/content/platform/commission/concepts/rule-matching.mdx +86 -0
  33. package/content/platform/commission/concepts/rules-and-rates.mdx +84 -0
  34. package/content/platform/commission/guides/batch-update-rules.mdx +58 -0
  35. package/content/platform/commission/guides/create-a-rate.mdx +72 -0
  36. package/content/platform/commission/guides/refresh-order-commission-lines.mdx +55 -0
  37. package/content/platform/commission/overview.mdx +86 -0
  38. package/content/platform/commission/reference/data-models.mdx +75 -0
  39. package/content/platform/commission/reference/events.mdx +58 -0
  40. package/content/platform/commission/reference/links.mdx +45 -0
  41. package/content/platform/commission/reference/service.mdx +51 -0
  42. package/content/platform/commission/reference/workflows.mdx +40 -0
  43. package/content/platform/offer/concepts/pricing-and-inventory.mdx +72 -0
  44. package/content/platform/offer/concepts/shipping.mdx +48 -0
  45. package/content/platform/offer/concepts/what-is-an-offer.mdx +65 -0
  46. package/content/platform/offer/guides/bulk-create-offers.mdx +84 -0
  47. package/content/platform/offer/guides/create-an-offer.mdx +83 -0
  48. package/content/platform/offer/guides/manage-offer-inventory.mdx +53 -0
  49. package/content/platform/offer/overview.mdx +84 -0
  50. package/content/platform/offer/reference/data-models.mdx +56 -0
  51. package/content/platform/offer/reference/events.mdx +39 -0
  52. package/content/platform/offer/reference/links.mdx +60 -0
  53. package/content/platform/offer/reference/service.mdx +53 -0
  54. package/content/platform/offer/reference/workflows.mdx +38 -0
  55. package/content/platform/order-group/concepts/computed-totals.mdx +59 -0
  56. package/content/platform/order-group/concepts/order-splitting.mdx +61 -0
  57. package/content/platform/order-group/concepts/the-order-group.mdx +64 -0
  58. package/content/platform/order-group/guides/list-order-groups.mdx +67 -0
  59. package/content/platform/order-group/guides/retrieve-an-order-group.mdx +63 -0
  60. package/content/platform/order-group/guides/split-a-cart.mdx +58 -0
  61. package/content/platform/order-group/overview.mdx +83 -0
  62. package/content/platform/order-group/reference/data-models.mdx +40 -0
  63. package/content/platform/order-group/reference/events.mdx +37 -0
  64. package/content/platform/order-group/reference/links.mdx +45 -0
  65. package/content/platform/order-group/reference/service.mdx +50 -0
  66. package/content/platform/order-group/reference/workflows.mdx +39 -0
  67. package/content/platform/payout/concepts/account-lifecycle.mdx +75 -0
  68. package/content/platform/payout/concepts/accounts-and-onboarding.mdx +70 -0
  69. package/content/platform/payout/concepts/payout-pipeline.mdx +99 -0
  70. package/content/platform/payout/guides/create-a-payout-account.mdx +59 -0
  71. package/content/platform/payout/guides/process-a-provider-webhook.mdx +74 -0
  72. package/content/platform/payout/guides/start-provider-onboarding.mdx +50 -0
  73. package/content/platform/payout/overview.mdx +86 -0
  74. package/content/platform/payout/reference/data-models.mdx +61 -0
  75. package/content/platform/payout/reference/events.mdx +48 -0
  76. package/content/platform/payout/reference/links.mdx +36 -0
  77. package/content/platform/payout/reference/service.mdx +53 -0
  78. package/content/platform/payout/reference/workflows.mdx +32 -0
  79. package/content/platform/product-edit/concepts/change-actions.mdx +66 -0
  80. package/content/platform/product-edit/concepts/change-pipeline.mdx +69 -0
  81. package/content/platform/product-edit/concepts/status-and-auto-confirm.mdx +66 -0
  82. package/content/platform/product-edit/guides/confirm-or-decline-a-change.mdx +76 -0
  83. package/content/platform/product-edit/guides/edit-a-product.mdx +74 -0
  84. package/content/platform/product-edit/guides/request-a-revision.mdx +54 -0
  85. package/content/platform/product-edit/overview.mdx +85 -0
  86. package/content/platform/product-edit/reference/data-models.mdx +65 -0
  87. package/content/platform/product-edit/reference/events.mdx +47 -0
  88. package/content/platform/product-edit/reference/links.mdx +39 -0
  89. package/content/platform/product-edit/reference/service.mdx +43 -0
  90. package/content/platform/product-edit/reference/workflows.mdx +49 -0
  91. package/content/platform/review/concepts/product-vs-seller-reviews.mdx +63 -0
  92. package/content/platform/review/concepts/ratings-and-moderation.mdx +64 -0
  93. package/content/platform/review/concepts/the-review-model.mdx +56 -0
  94. package/content/platform/review/guides/compute-aggregate-ratings.mdx +57 -0
  95. package/content/platform/review/guides/create-a-review.mdx +55 -0
  96. package/content/platform/review/guides/moderate-a-review.mdx +58 -0
  97. package/content/platform/review/guides/respond-to-a-review.mdx +61 -0
  98. package/content/platform/review/overview.mdx +87 -0
  99. package/content/platform/review/reference/data-models.mdx +36 -0
  100. package/content/platform/review/reference/events.mdx +61 -0
  101. package/content/platform/review/reference/links.mdx +43 -0
  102. package/content/platform/review/reference/service.mdx +54 -0
  103. package/content/platform/review/reference/workflows.mdx +31 -0
  104. package/content/platform/store/concepts/lifecycle.mdx +62 -0
  105. package/content/platform/store/concepts/store-entity.mdx +53 -0
  106. package/content/platform/store/concepts/team.mdx +50 -0
  107. package/content/platform/store/guides/create-a-store.mdx +55 -0
  108. package/content/platform/store/guides/manage-the-team.mdx +55 -0
  109. package/content/platform/store/guides/moderate-a-store.mdx +59 -0
  110. package/content/platform/store/overview.mdx +86 -0
  111. package/content/platform/store/reference/data-models.mdx +89 -0
  112. package/content/platform/store/reference/events.mdx +43 -0
  113. package/content/platform/store/reference/links.mdx +71 -0
  114. package/content/platform/store/reference/service.mdx +51 -0
  115. package/content/platform/store/reference/workflows.mdx +35 -0
  116. package/content/references/api/admin/commission-rates/create-commission-rate.mdx +1 -1
  117. package/content/references/api/admin/commission-rates/list-commission-rates.mdx +2 -2
  118. package/content/references/api/admin/commission-rates/update-commission-rate.mdx +1 -1
  119. package/content/references/api/admin/offers/batch-create-offers.mdx +3 -3
  120. package/content/references/api/admin/order-groups/list-order-groups.mdx +1 -1
  121. package/content/references/api/admin/product-attributes/create-attribute-value.mdx +2 -2
  122. package/content/references/api/admin/product-attributes/create-product-attribute.mdx +1 -1
  123. package/content/references/api/admin/product-attributes/update-product-attribute.mdx +1 -1
  124. package/content/references/api/admin/product-changes/confirm-product-change.mdx +1 -1
  125. package/content/references/api/admin/products/batch-product-attributes.mdx +1 -1
  126. package/content/references/api/admin/products/create-product.mdx +1 -1
  127. package/content/references/api/admin/products/preview-product.mdx +1 -1
  128. package/content/references/api/admin.mdx +4 -5
  129. package/content/references/api/conventions.mdx +9 -7
  130. package/content/references/api/store/carts/add-line-item.mdx +1 -1
  131. package/content/references/api/store/offers/list-offers.mdx +1 -1
  132. package/content/references/api/store/order-groups/list-order-groups.mdx +1 -1
  133. package/content/references/api/store.mdx +4 -13
  134. package/content/references/api/vendor/members/accept-member-invite.mdx +1 -1
  135. package/content/references/api/vendor/offers/batch-create-offers.mdx +4 -0
  136. package/content/references/api/vendor/offers/batch-offer-inventory-items.mdx +2 -0
  137. package/content/references/api/vendor/offers/create-offer.mdx +13 -1
  138. package/content/references/api/vendor/offers/list-offers.mdx +4 -0
  139. package/content/references/api/vendor/offers/retrieve-offer.mdx +4 -0
  140. package/content/references/api/vendor/offers/update-offer.mdx +12 -0
  141. package/content/references/api/vendor/payout-accounts/create-onboarding.mdx +1 -1
  142. package/content/references/api/vendor/products/batch-product-attributes.mdx +1 -1
  143. package/content/references/api/vendor/products/create-product-variant.mdx +1 -1
  144. package/content/references/api/vendor/products/create-product.mdx +1 -1
  145. package/content/references/api/vendor/products/delete-product.mdx +1 -1
  146. package/content/references/api/vendor/products/update-product.mdx +1 -1
  147. package/content/references/api/vendor/sellers/create-seller.mdx +2 -2
  148. package/content/references/api/vendor/sellers/list-sellers.mdx +1 -1
  149. package/content/references/api/vendor.mdx +6 -5
  150. package/content/references/configuration.mdx +16 -33
  151. package/content/references/overview.mdx +34 -52
  152. package/content/references/panel-extensions/create-page.mdx +194 -0
  153. package/content/references/panel-extensions/custom-fields.mdx +256 -0
  154. package/content/references/panel-extensions/overview.mdx +102 -0
  155. package/content/references/panel-extensions/widgets.mdx +212 -0
  156. package/content/resources/ai/mcp.mdx +2 -2
  157. package/content/resources/ai/overview.mdx +21 -16
  158. package/content/resources/ai/skills.mdx +67 -0
  159. package/content/resources/best-practices/api-routes.mdx +55 -43
  160. package/content/resources/best-practices/custom-fields.mdx +116 -92
  161. package/content/resources/best-practices/frontend.mdx +62 -50
  162. package/content/resources/best-practices/module-links.mdx +48 -34
  163. package/content/resources/best-practices/modules.mdx +53 -27
  164. package/content/resources/best-practices/overview.mdx +45 -17
  165. package/content/resources/best-practices/subscribers-and-jobs.mdx +37 -24
  166. package/content/resources/best-practices/types.mdx +38 -23
  167. package/content/resources/best-practices/workflows.mdx +33 -21
  168. package/content/resources/customization/custom-fields.mdx +15 -15
  169. package/content/resources/customization/extend-a-workflow.mdx +7 -4
  170. package/content/resources/customization/extending-panels.mdx +55 -52
  171. package/content/resources/deployment/medusa-cloud.mdx +21 -20
  172. package/content/resources/deployment/self-host.mdx +123 -0
  173. package/content/resources/integrations/overview.mdx +38 -0
  174. package/content/resources/integrations/stripe-connect.mdx +39 -38
  175. package/content/resources/tutorials/add-a-block.mdx +25 -18
  176. package/content/resources/tutorials/add-a-widget.mdx +32 -23
  177. package/content/resources/tutorials/add-order-detail-button.mdx +33 -20
  178. package/content/resources/tutorials/attributes-and-variant-axes.mdx +28 -27
  179. package/content/resources/tutorials/build-a-block.mdx +26 -15
  180. package/content/resources/tutorials/custom-api-route.mdx +32 -20
  181. package/content/resources/tutorials/custom-panel-page.mdx +21 -12
  182. package/content/resources/tutorials/customize-navigation.mdx +30 -23
  183. package/content/resources/tutorials/extend-forms-and-tables.mdx +36 -28
  184. package/content/resources/tutorials/extend-onboarding.mdx +38 -35
  185. package/content/resources/tutorials/master-products-and-offers.mdx +28 -23
  186. package/content/telemetry.mdx +3 -3
  187. package/content/user-guide/admin/attributes/how-tos/create-an-attribute.mdx +64 -0
  188. package/content/user-guide/admin/attributes/how-tos/manage-possible-values.mdx +40 -0
  189. package/content/user-guide/admin/attributes/overview.mdx +22 -0
  190. package/content/user-guide/admin/commissions/how-tos/create-a-commission-rule.mdx +63 -0
  191. package/content/user-guide/admin/commissions/how-tos/edit-the-global-commission.mdx +48 -0
  192. package/content/user-guide/admin/commissions/how-tos/manage-a-commission-rule.mdx +45 -0
  193. package/content/user-guide/admin/commissions/overview.mdx +25 -0
  194. package/content/user-guide/admin/overview.mdx +20 -12
  195. package/content/user-guide/admin/product-requests/how-tos/review-a-new-product.mdx +58 -0
  196. package/content/user-guide/admin/product-requests/how-tos/review-a-product-edit.mdx +48 -0
  197. package/content/user-guide/admin/product-requests/overview.mdx +25 -0
  198. package/content/user-guide/vendor/offers/how-tos/create-an-offer.mdx +59 -0
  199. package/content/user-guide/vendor/offers/how-tos/update-prices-and-stock.mdx +40 -0
  200. package/content/user-guide/vendor/offers/overview.mdx +22 -0
  201. package/content/user-guide/vendor/onboarding.mdx +79 -0
  202. package/content/user-guide/vendor/orders/how-tos/fulfill-an-order.mdx +49 -0
  203. package/content/user-guide/vendor/orders/how-tos/mark-an-order-as-delivered.mdx +33 -0
  204. package/content/user-guide/vendor/orders/how-tos/process-a-return.mdx +42 -0
  205. package/content/user-guide/vendor/orders/how-tos/refund-an-order.mdx +38 -0
  206. package/content/user-guide/vendor/orders/how-tos/ship-an-order.mdx +40 -0
  207. package/content/user-guide/vendor/orders/overview.mdx +31 -0
  208. package/content/user-guide/vendor/overview.mdx +23 -12
  209. package/content/user-guide/vendor/products/how-tos/edit-a-product.mdx +44 -0
  210. package/content/user-guide/vendor/products/how-tos/submit-a-product.mdx +63 -0
  211. package/content/user-guide/vendor/products/overview.mdx +22 -0
  212. package/llms.txt +176 -142
  213. package/package.json +1 -1
  214. package/content/learn/concepts.mdx +0 -84
  215. package/content/learn/installation.mdx +0 -117
  216. package/content/learn/mirakl-alternative.mdx +0 -86
  217. package/content/migration/from-1-x-to-2-0.mdx +0 -152
  218. package/content/migration/from-2-0-to-2-1.mdx +0 -105
  219. package/content/migration/overview.mdx +0 -58
  220. package/content/references/api/store/search/search.mdx +0 -136
  221. package/content/references/modules/commission.mdx +0 -106
  222. package/content/references/modules/custom-fields.mdx +0 -45
  223. package/content/references/modules/media.mdx +0 -55
  224. package/content/references/modules/offer.mdx +0 -64
  225. package/content/references/modules/payout.mdx +0 -121
  226. package/content/references/modules/product-attribute.mdx +0 -111
  227. package/content/references/modules/product-edit.mdx +0 -80
  228. package/content/references/modules/search.mdx +0 -112
  229. package/content/references/modules/seller.mdx +0 -175
  230. package/content/references/panel-extension-api.mdx +0 -337
  231. package/content/references/workflows/cart/add-seller-shipping-method-to-cart.mdx +0 -48
  232. package/content/references/workflows/cart/complete-cart-with-split-orders.mdx +0 -36
  233. package/content/references/workflows/cart/list-seller-shipping-options-for-cart.mdx +0 -39
  234. package/content/references/workflows/cart/update-cart-seller-promotions.mdx +0 -42
  235. package/content/references/workflows/commission/batch-commission-rules.mdx +0 -49
  236. package/content/references/workflows/commission/create-commission-rates.mdx +0 -41
  237. package/content/references/workflows/commission/delete-commission-rates.mdx +0 -34
  238. package/content/references/workflows/commission/refresh-order-commission-lines.mdx +0 -30
  239. package/content/references/workflows/commission/update-commission-rates.mdx +0 -35
  240. package/content/references/workflows/media/set-category-images.mdx +0 -41
  241. package/content/references/workflows/media/set-collection-images.mdx +0 -41
  242. package/content/references/workflows/member/accept-member-invite.mdx +0 -33
  243. package/content/references/workflows/member/add-seller-member.mdx +0 -30
  244. package/content/references/workflows/member/create-member-invites.mdx +0 -34
  245. package/content/references/workflows/member/delete-member-invite.mdx +0 -24
  246. package/content/references/workflows/member/remove-seller-member.mdx +0 -28
  247. package/content/references/workflows/member/resend-member-invite.mdx +0 -28
  248. package/content/references/workflows/member/update-member-role.mdx +0 -28
  249. package/content/references/workflows/member/update-member.mdx +0 -35
  250. package/content/references/workflows/offer/batch-offer-inventory-items.mdx +0 -62
  251. package/content/references/workflows/offer/create-offers.mdx +0 -65
  252. package/content/references/workflows/offer/delete-offers.mdx +0 -35
  253. package/content/references/workflows/offer/update-offers.mdx +0 -53
  254. package/content/references/workflows/order/cancel-order-fulfillment.mdx +0 -34
  255. package/content/references/workflows/order/confirm-claim-request.mdx +0 -25
  256. package/content/references/workflows/order/confirm-exchange-request.mdx +0 -25
  257. package/content/references/workflows/order/confirm-order-edit-request.mdx +0 -25
  258. package/content/references/workflows/order/confirm-return-receive.mdx +0 -25
  259. package/content/references/workflows/order/create-order-fulfillment.mdx +0 -45
  260. package/content/references/workflows/order-group/get-order-group-detail.mdx +0 -29
  261. package/content/references/workflows/order-group/get-order-groups-list.mdx +0 -38
  262. package/content/references/workflows/overview.mdx +0 -72
  263. package/content/references/workflows/payout/create-onboarding.mdx +0 -36
  264. package/content/references/workflows/payout/create-payout-account.mdx +0 -33
  265. package/content/references/workflows/payout/create-payout.mdx +0 -30
  266. package/content/references/workflows/payout/process-payout-for-webhook.mdx +0 -34
  267. package/content/references/workflows/product/confirm-products.mdx +0 -48
  268. package/content/references/workflows/product/create-products.mdx +0 -63
  269. package/content/references/workflows/product/link-sellers-to-product-category.mdx +0 -40
  270. package/content/references/workflows/product/link-sellers-to-product.mdx +0 -40
  271. package/content/references/workflows/product/reject-product.mdx +0 -48
  272. package/content/references/workflows/product/request-product-change.mdx +0 -48
  273. package/content/references/workflows/product-attribute/add-product-attributes-to-product.mdx +0 -49
  274. package/content/references/workflows/product-attribute/create-and-link-product-attributes-to-product.mdx +0 -46
  275. package/content/references/workflows/product-attribute/create-product-attribute-values.mdx +0 -43
  276. package/content/references/workflows/product-attribute/create-product-attributes.mdx +0 -56
  277. package/content/references/workflows/product-attribute/delete-product-attribute-values.mdx +0 -30
  278. package/content/references/workflows/product-attribute/delete-product-attributes.mdx +0 -30
  279. package/content/references/workflows/product-attribute/remove-product-attributes-from-product.mdx +0 -29
  280. package/content/references/workflows/product-attribute/update-product-attribute-values.mdx +0 -44
  281. package/content/references/workflows/product-attribute/update-product-attributes-on-product.mdx +0 -41
  282. package/content/references/workflows/product-attribute/update-product-attributes.mdx +0 -48
  283. package/content/references/workflows/product-attribute/upsert-product-attribute-values.mdx +0 -43
  284. package/content/references/workflows/product-edit/auto-confirm-product-change.mdx +0 -39
  285. package/content/references/workflows/product-edit/cancel-product-change.mdx +0 -49
  286. package/content/references/workflows/product-edit/confirm-product-change.mdx +0 -57
  287. package/content/references/workflows/product-edit/create-product-change.mdx +0 -72
  288. package/content/references/workflows/product-edit/reject-product-change.mdx +0 -54
  289. package/content/references/workflows/product-edit/stage-product-change.mdx +0 -75
  290. package/content/references/workflows/seller/approve-seller.mdx +0 -36
  291. package/content/references/workflows/seller/create-seller-account.mdx +0 -59
  292. package/content/references/workflows/seller/create-seller-defaults.mdx +0 -22
  293. package/content/references/workflows/seller/create-sellers.mdx +0 -65
  294. package/content/references/workflows/seller/delete-seller-professional-details.mdx +0 -37
  295. package/content/references/workflows/seller/delete-sellers.mdx +0 -24
  296. package/content/references/workflows/seller/invite-seller.mdx +0 -28
  297. package/content/references/workflows/seller/suspend-seller.mdx +0 -37
  298. package/content/references/workflows/seller/terminate-seller.mdx +0 -37
  299. package/content/references/workflows/seller/unsuspend-seller.mdx +0 -36
  300. package/content/references/workflows/seller/unterminate-seller.mdx +0 -36
  301. package/content/references/workflows/seller/update-seller-address.mdx +0 -55
  302. package/content/references/workflows/seller/update-seller-payment-details.mdx +0 -52
  303. package/content/references/workflows/seller/update-seller-professional-details.mdx +0 -48
  304. package/content/references/workflows/seller/update-sellers.mdx +0 -57
  305. package/content/resources/ai/llms.mdx +0 -74
  306. package/content/resources/integrations/notifications.mdx +0 -39
  307. package/content/resources/integrations/search.mdx +0 -122
  308. package/content/resources/tutorials/configure-commissions.mdx +0 -127
  309. package/content/resources/tutorials/first-marketplace.mdx +0 -45
  310. package/content/resources/tutorials/handle-product-requests.mdx +0 -80
  311. package/content/resources/tutorials/import-export-products.mdx +0 -96
  312. package/content/resources/tutorials/seller-payouts-stripe.mdx +0 -89
  313. package/content/resources/tutorials/store-setup-checklist.mdx +0 -214
  314. package/content/tools/api-client.mdx +0 -155
  315. package/content/tools/cli.mdx +0 -196
  316. package/content/tools/dashboard-sdk.mdx +0 -35
@@ -1,117 +0,0 @@
1
- ---
2
- title: "Installation"
3
- description: "Install Mercur and set up your marketplace project."
4
- ---
5
-
6
- ## Requirements
7
-
8
- - [Node.js v20+](https://nodejs.org/en/download) (LTS version)
9
- - [Bun v1.3+](https://bun.sh) (recommended package manager)
10
- - [Git](https://git-scm.com/downloads)
11
- - PostgreSQL v14+
12
-
13
- <Tip>
14
- The quickest way to get PostgreSQL running locally is with Docker:
15
-
16
- ```bash
17
- docker run -d --name mercur-postgres \
18
- -e POSTGRES_PASSWORD=postgres \
19
- -p 5432:5432 postgres:16
20
- ```
21
-
22
- Or on macOS with Homebrew:
23
-
24
- ```bash
25
- brew install postgresql@16 && brew services start postgresql@16
26
- ```
27
- </Tip>
28
-
29
- ## Create a new project
30
-
31
- ```bash
32
- bun create mercur-app@latest
33
- ```
34
-
35
- The CLI will prompt for a project name and template, then handle everything automatically:
36
- - downloads the template
37
- - installs dependencies
38
- - creates and migrates the database
39
- - seeds initial data
40
- - starts the development server and opens the admin setup page in your browser
41
-
42
- ### Options
43
-
44
- | Option | Description | Default |
45
- |--------|-------------|---------|
46
- | `--template <template>` | Template to use (`basic` or `plugin`) | prompted |
47
- | `--db-connection-string <string>` | Full PostgreSQL connection string | — |
48
- | `--db-host <host>` | PostgreSQL host | `localhost` |
49
- | `--db-port <port>` | PostgreSQL port | `5432` |
50
- | `--no-deps` | Skip dependency installation | — |
51
- | `--skip-db` | Skip database setup | — |
52
-
53
- ## Access your marketplace
54
-
55
- Once the development server is running, your marketplace is available at:
56
-
57
- | Panel | URL |
58
- |-------|-----|
59
- | API | `http://localhost:9000` |
60
- | Admin Panel | `http://localhost:9000/dashboard` |
61
- | Vendor Panel | `http://localhost:9000/seller` |
62
-
63
- ### Create an admin account
64
-
65
- The CLI automatically opens the admin invite page in your browser after setup. Follow the on-screen instructions to create your first admin account.
66
-
67
- ### Create your first seller
68
-
69
- The seed data does not include a seller account. To create one, open the Vendor Panel and register:
70
-
71
- ```
72
- http://localhost:9000/seller/register
73
- ```
74
-
75
- Fill in the registration form and complete the onboarding wizard. Once submitted, the seller will appear in the Admin Panel for approval.
76
-
77
- ## Start the development server
78
-
79
- After stopping the server, start it again from your project directory:
80
-
81
- ```bash
82
- cd <your-project-name>
83
- bun dev
84
- ```
85
-
86
- ## Initialize an existing project
87
-
88
- If you have an existing Medusa project, initialize Mercur in it:
89
-
90
- ```bash
91
- bunx @mercurjs/cli@latest init
92
- ```
93
-
94
- This creates a `blocks.json` configuration file in your project.
95
-
96
- ## Add blocks
97
-
98
- Install blocks from the registry:
99
-
100
- ```bash
101
- bunx @mercurjs/cli@latest add <block-name>
102
- ```
103
-
104
- Browse available blocks:
105
-
106
- ```bash
107
- bunx @mercurjs/cli@latest search
108
- ```
109
-
110
- ## Run database migrations
111
-
112
- After adding blocks that include modules:
113
-
114
- ```bash
115
- bunx medusa db:generate <module1> <module2> ...
116
- bunx medusa db:migrate
117
- ```
@@ -1,86 +0,0 @@
1
- ---
2
- title: "Mercur - an open-source Mirakl alternative"
3
- description: "How Mercur compares to Mirakl and other marketplace platforms: open-source, self-hosted, no GMV fees, full code ownership."
4
- ---
5
-
6
- If you're evaluating [Mirakl](https://www.mirakl.com/) - or any hosted, enterprise marketplace SaaS - Mercur is the open-source alternative built for teams that want to own their marketplace outright instead of renting it.
7
-
8
- Mirakl is a mature, capable platform. It's also closed-source, priced as a percentage of the GMV that flows through it, and delivered as a hosted service you don't control. Mercur takes the opposite position: MIT-licensed core, self-hosted on your own infrastructure, no per-transaction cut, and full access to every line of code.
9
-
10
- This page is an honest comparison. Mirakl is the right choice for some teams; Mercur is the right choice for others. The goal here is to help you tell which one you are.
11
-
12
- ## At a glance
13
-
14
- | | **Mercur** | **Mirakl** |
15
- | ----------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------- |
16
- | **License** | Open source (MIT core) | Proprietary / closed source |
17
- | **Hosting** | Self-host anywhere, or fully managed (Medusa Cloud / Rigby-hosted) | Vendor-hosted SaaS only |
18
- | **Pricing model** | No GMV fees, no per-transaction cut | Percentage of GMV + platform fees |
19
- | **Code ownership** | Full source access; fork or modify freely | No source access |
20
- | **Customization** | Extend/override workflows, APIs, and UI without forking | Configuration within platform limits |
21
- | **Data ownership** | Your database, your infrastructure | Vendor-controlled |
22
- | **Tech stack** | TypeScript, Node.js, React, PostgreSQL | Proprietary |
23
- | **Extensibility** | Composable blocks, typed API client, workflow hooks, Dashboard SDK | Connectors and APIs within the platform |
24
- | **Storefront** | Bring your own (headless, API-first) | Integrated / connector-based |
25
- | **Enterprise features** | Mercur Enterprise: Buy Box, dedup, master-data governance, KYC - on your own infra | Included in the platform |
26
- | **Support & SLAs** | Contractual SLAs and named contact via Mercur Enterprise | Vendor support contract |
27
- | **Delivery help** | Rigby builds/launches marketplaces with you | Sales-led onboarding |
28
- | **Time to first marketplace** | `bun create mercur-app` in minutes | Sales-led onboarding |
29
-
30
- ## Where Mercur is the better fit
31
-
32
- - **You want to own your marketplace, not rent it.** No percentage of GMV, no per-transaction cut, no vendor lock-in. Your data, customers, and roadmap stay yours.
33
- - **You have (or want) an engineering team.** Mercur is code you control end-to-end. If you plan to customize deeply - bespoke commission logic, custom vendor onboarding, non-standard order flows - an open, hackable core is a decisive advantage over a configuration-bound SaaS.
34
- - **You need to control where data lives.** Self-host on your own cloud, on-prem, or inside an air-gapped network. There's no proprietary runtime to adopt and no hosting tier you're forced onto.
35
- - **You want to avoid platform risk.** MIT license means the core can never be taken away from you, re-priced out from under you, or discontinued.
36
-
37
- ## Enterprise-grade, without giving up ownership
38
-
39
- The features that usually pull teams toward Mirakl - a winning-offer engine, product deduplication, master-data governance, multi-channel stock sync, vendor KYC - aren't a reason to accept closed source and GMV fees. **[Mercur Enterprise](https://www.mercurjs.com/enterprise)** delivers that same enterprise surface area as a licensed module suite you deploy and run on your own infrastructure, exactly like the open-source core:
40
-
41
- - **Buy Box / winning-offer engine** - pick the winning offer across competing sellers, the way large marketplaces do.
42
- - **EAN matching & deduplication** - collapse duplicate seller submissions into a single master product.
43
- - **Master-data governance** - controlled, auditable catalog data across thousands of vendors.
44
- - **Multi-channel stock sync** - keep inventory consistent across sales channels and feeds.
45
- - **Automated split payouts & vendor KYC** - compliant onboarding and settlement at scale.
46
-
47
- …and more, with new modules added over time.
48
-
49
- Everything is maintained, tested, and upgraded by the core team, and backed by a direct support relationship: a dedicated support channel, contractual SLAs with guaranteed response times, prioritized bug fixes and security patches, and hands-on onboarding and architecture guidance. Higher tiers add priority escalation and a named technical contact.
50
-
51
- The difference from Mirakl: you still own the code, host it yourself, and pay no percentage of GMV.
52
-
53
- ## Don't want to build it yourself? We'll build it with you
54
-
55
- Mercur is built and maintained by [Rigby](https://rigbyjs.com), a team that has designed, built, and launched multi-vendor marketplaces in production. If you'd rather not staff the whole project, we work alongside your team - architecture reviews, integrating Mercur with your existing stack, hardening, scaling, and getting your marketplace live on schedule.
56
-
57
- This closes the usual "we don't have engineering capacity" gap that sends teams to a fully managed SaaS: you get a done-with-you (or done-for-you) delivery path _and_ keep an open-source core you own. [Talk to our team](https://www.mercurjs.com/contact).
58
-
59
- ### Don't want to run the infrastructure either?
60
-
61
- You don't have to. Not wanting to manage servers is not a reason to accept closed source and GMV fees - Mercur runs as a fully managed deployment too. Ship it to [Medusa Cloud](https://medusajs.com/pricing/) with push-to-deploy and auto-scaling, or have Rigby deploy, host, and operate it for you. Either way you get the zero-ops experience of a SaaS while keeping the open-source core, your data, and no percentage of GMV.
62
-
63
- ## Migrating from Mirakl
64
-
65
- Already live on Mirakl? Rigby helps you move - porting your catalog, sellers, offers, orders, and commission structure onto Mercur, then hardening and cutting over without disrupting your marketplace. [Talk to our team](https://www.mercurjs.com/contact) to scope a migration.
66
-
67
- ## What Mercur gives you
68
-
69
- Built on the [Medusa](https://medusajs.com) commerce framework, Mercur adds the marketplace layer on top:
70
-
71
- - **Multi-vendor sellers** - onboarding, approval, suspension, and member management.
72
- - **Master products & offers** - a shared catalog where multiple sellers list offers (SKU, price, inventory, shipping) against the same product.
73
- - **Commissions** - configurable fixed or percentage rules matching across product, type, collection, category, and seller.
74
- - **Automated vendor payouts** - a pluggable payout pipeline with Stripe Connect out of the box.
75
- - **Order splitting** - a single customer cart spanning multiple sellers splits into per-seller orders under an order group.
76
- - **Admin and Vendor panels** - role-specific dashboards, plus a headless Store API for any storefront.
77
-
78
- See [Concepts](/rc/learn/concepts) and [Architecture](/rc/learn/architecture) for the full picture, or jump straight to [Installation](/rc/learn/installation) to spin up a marketplace locally.
79
-
80
- ## Get started
81
-
82
- ```sh
83
- bun create mercur-app@latest my-marketplace
84
- ```
85
-
86
- Then head to the [Installation guide](/rc/learn/installation) to run it locally, or [talk to our team](https://www.mercurjs.com/contact) if you're migrating from an existing platform.
@@ -1,152 +0,0 @@
1
- ---
2
- title: From 1.x to 2.0
3
- description: What changed and how to port your existing Mercur 1.x code to 2.0.
4
- ---
5
-
6
- # Migrating from 1.x to 2.0
7
-
8
- Start with a working 2.0 project (see [Installation](/rc/learn/installation)). This guide covers what to change when porting your 1.x code.
9
-
10
- <Note>
11
- **Using version older than 1.4.0?** Your admin panel code is inside the backend repo (not a separate app). When scanning for custom admin code to port, look there instead of `apps/admin/`. Everything else in this guide applies identically.
12
- </Note>
13
-
14
- ## Package Mapping
15
-
16
- | 1.x Package | 2.0 Equivalent |
17
- |-------------|----------------|
18
- | `@mercurjs/b2c-core` | `@mercurjs/core` |
19
- | `@mercurjs/commission` | Built into core |
20
- | `@mercurjs/algolia` | Block: `mercurjs add algolia` |
21
- | `@mercurjs/resend` | No 2.0 equivalent — port manually |
22
- | `@mercurjs/payment-stripe-connect` | No 2.0 equivalent — port manually |
23
- | `@mercurjs/stripe-tax-provider` | No 2.0 equivalent — port manually |
24
- | `@medusajs/admin-vite-plugin` | `@mercurjs/dashboard-sdk` |
25
- | `@medusajs/js-sdk` | `@mercurjs/client` |
26
-
27
- ## Directory Mapping
28
-
29
- | 1.x | 2.0 |
30
- |-----|-----|
31
- | `apps/backend/src/*` | `packages/api/src/*` |
32
- | `apps/admin/src/routes/` | `apps/admin/src/pages/` |
33
- | `apps/vendor/src/routes/` | `apps/vendor/src/pages/` |
34
-
35
- ## What You DON'T Need to Port
36
-
37
- Built into core today:
38
-
39
- - `seller`
40
- - `payout`
41
- - `commission`
42
-
43
- Moved to registry blocks:
44
-
45
- - `reviews`
46
- - `requests`
47
- - `wishlist`
48
- - `team-management`
49
- - `algolia`
50
- - `vendor-notifications`
51
- - `vendor-chat`
52
- - `product-import-export`
53
-
54
- Install these blocks instead of porting their 1.x package code.
55
-
56
- ## Current Migration Exceptions
57
-
58
- These areas do not currently have full 1.x parity and should be treated as manual migration work:
59
-
60
- - **`TaxCode`** — no 2.0 equivalent today. Port the old logic manually if your project depends on it.
61
- - **`SecondaryCategory`** — no full 1.x parity today. Port manually for now if your project depends on it. Fuller support is planned for a future 2.x release.
62
- - **Product attributes** — the 1.x attribute module is not carried over 1:1. Port manually for now if your project depends on it. Fuller support is planned for a future 2.x release.
63
-
64
- ## Order Set to Order Group
65
-
66
- The 1.x `OrderSet` entity has been renamed to **`OrderGroup`** in 2.0. This is a breaking change that affects database tables, API endpoints, workflow names, event names, and types.
67
-
68
- ### What changed
69
-
70
- | Aspect | 1.x | 2.0 |
71
- |--------|-----|-----|
72
- | Entity / table | `order_set` | `order_group` |
73
- | ID prefix | `os_` | `og_` |
74
- | API endpoints | `/admin/order-sets`, `/store/order-set` | `/admin/order-groups`, `/store/order-groups` |
75
- | Workflows | `getFormattedOrderSetListWorkflow` | `getOrderGroupsListWorkflow`, `getOrderGroupDetailWorkflow` |
76
- | Events | `OrderSetWorkflowEvents` | `OrderGroupWorkflowEvents` |
77
- | Types | `OrderSetDTO` | `OrderGroupDTO` (from `@mercurjs/types`) |
78
-
79
- ### Removed fields
80
-
81
- Two fields that existed on `OrderSet` in 1.x have been **removed** from `OrderGroup`:
82
-
83
- - **`payment_collection_id`** — Payment collections are now linked at the individual **order** level, not at the group level. Each per-seller order gets its own link to the cart's payment collection during checkout. To get the payment collection, query the linked orders instead of the group.
84
- - **`sales_channel_id`** — Sales channel information is stored on each individual order, not on the group.
85
-
86
- ### New computed fields
87
-
88
- Two fields are now **computed at query time** (not stored as columns):
89
-
90
- - **`seller_count`** — Count of distinct sellers across all linked orders
91
- - **`total`** — Sum of order totals from linked order summaries
92
-
93
- ### Migration steps
94
-
95
- 1. Update imports: `OrderSetDTO` → `OrderGroupDTO` (from `@mercurjs/types`)
96
- 2. Update API calls: `/order-sets` → `/order-groups`
97
- 3. Update workflow references: `getFormattedOrderSetListWorkflow` → `getOrderGroupsListWorkflow`
98
- 4. Update event listeners: `OrderSetWorkflowEvents` → `OrderGroupWorkflowEvents`
99
- 5. If you used `payment_collection_id` or `sales_channel_id` from the order set, retrieve these from the individual orders instead (via the `order_group_order` link)
100
-
101
- See [Order Groups](/rc/learn/order-groups) for the full 2.0 data model and API reference.
102
-
103
- ## Porting Custom Backend Code
104
-
105
- ### Modules
106
-
107
- Copy to `packages/api/src/modules/`, register in `medusa-config.ts`. Update imports from `@mercurjs/b2c-core` to `@mercurjs/core`.
108
-
109
- ### Workflows
110
-
111
- Copy to `packages/api/src/workflows/<entity>/`. Don't create barrel `index.ts` files — conflicts with block installation.
112
-
113
- ### API Routes
114
-
115
- Copy to `packages/api/src/api/`. Type both generics — codegen reads these:
116
-
117
- ```typescript
118
- export const GET = async (
119
- req: AuthenticatedMedusaRequest<BodyType>,
120
- res: MedusaResponse<ResponseType>
121
- ) => { ... }
122
- ```
123
-
124
- Run `bunx @mercurjs/cli@latest codegen` after adding routes.
125
-
126
- ### Links and Subscribers
127
-
128
- Copy to `packages/api/src/links/` and `src/subscribers/`. Don't duplicate links that core already provides (seller↔product, seller↔order, etc.).
129
-
130
- ### Custom Providers
131
-
132
- Copy to `packages/api/src/providers/`. Two required changes:
133
-
134
- ```typescript
135
- // medusa-config.ts — must use ./src/ prefix
136
- resolve: './src/providers/my-provider'
137
-
138
- // provider index.ts — must import from framework/utils
139
- import { Modules, ModuleProvider } from "@medusajs/framework/utils"
140
- ```
141
-
142
- ## Porting Custom Dashboard Code
143
-
144
- Only if you have custom pages not covered by core-admin/vendor.
145
-
146
- | Old import | New import |
147
- |-----------|------------|
148
- | `@medusajs/js-sdk` | `@mercurjs/client` |
149
- | `@custom-types/*` | `@mercurjs/types` |
150
- | `@hooks/*`, `@components/*`, `@lib/*` | Keep local, or `@mercurjs/dashboard-shared` if the symbol exists there |
151
-
152
- Move pages from `src/routes/` to `src/pages/` with `export default`.
@@ -1,105 +0,0 @@
1
- ---
2
- title: From 2.0 to 2.1
3
- description: What changed in Mercur 2.1 and how to upgrade an existing 2.0.x project.
4
- ---
5
-
6
- # Migrating from 2.0 to 2.1
7
-
8
- Mercur `2.1.1` is the first stable release of the 2.x line after `2.0.2`. The only required change is a package rename. Everything else is handled by `bun run medusa db:migrate`.
9
-
10
- If you are starting fresh, follow [Installation](/rc/learn/installation) instead — new projects already use the 2.1 names.
11
-
12
- ## Breaking change: `@mercurjs/core-plugin` → `@mercurjs/core`
13
-
14
- The Medusa plugin previously published as `@mercurjs/core-plugin` is now published as **`@mercurjs/core`**. The package contents are the same; only the name changed.
15
-
16
- This affects:
17
-
18
- - `package.json` — installed package name
19
- - `medusa-config.ts` — every `resolve: "@mercurjs/core-plugin/..."` value
20
- - Any source imports in `packages/api/src/**`
21
-
22
- ### Step 1 — swap the dependency
23
-
24
- ```bash
25
- bun remove @mercurjs/core-plugin
26
- bun add @mercurjs/core@2.1.1
27
- ```
28
-
29
- If you use npm/yarn/pnpm, use the equivalent commands for your package manager.
30
-
31
- Or edit `packages/api/package.json` by hand — replace the `@mercurjs/core-plugin` entry under `dependencies` with `@mercurjs/core` at the matching version, then run your installer:
32
-
33
- ```jsonc
34
- // before
35
- "dependencies": {
36
- "@mercurjs/core-plugin": "2.0.2"
37
- }
38
-
39
- // after
40
- "dependencies": {
41
- "@mercurjs/core": "2.1.1"
42
- }
43
- ```
44
-
45
- ```bash
46
- bun install
47
- ```
48
-
49
- ### Step 2 — replace strings in config and source
50
-
51
- In `packages/api/medusa-config.ts` and anywhere under `packages/api/src/**`, replace every occurrence of `@mercurjs/core-plugin` with `@mercurjs/core`. A repo-wide find-and-replace is safe — there are no other valid uses of the old name.
52
-
53
- ```ts
54
- // before
55
- {
56
- resolve: "@mercurjs/core-plugin/modules/seller",
57
- }
58
-
59
- // after
60
- {
61
- resolve: "@mercurjs/core/modules/seller",
62
- }
63
- ```
64
-
65
- ```ts
66
- // before
67
- import { createSellerWorkflow } from "@mercurjs/core-plugin/workflows"
68
-
69
- // after
70
- import { createSellerWorkflow } from "@mercurjs/core/workflows"
71
- ```
72
-
73
- The same applies to:
74
-
75
- - `@mercurjs/core-plugin/modules/<module>`
76
- - `@mercurjs/core-plugin/workflows`
77
- - `@mercurjs/core-plugin/links`
78
- - `@mercurjs/core-plugin/api`
79
-
80
- ### Step 3 — reinstall and rebuild
81
-
82
- ```bash
83
- bun install
84
- bun run build
85
- ```
86
-
87
- If TypeScript still complains about `@mercurjs/core-plugin`, you missed an import. Re-run the find-and-replace.
88
-
89
- ### Step 4 — refresh installed blocks
90
-
91
- If your project installed registry blocks (`mercurjs add reviews`, `mercurjs add requests`, etc.) on a 2.0.x version, the local copies still reference `@mercurjs/core-plugin`. Either:
92
-
93
- - Run the same find-and-replace inside `packages/api/src/` (registry blocks live there once installed)
94
-
95
- ## Database migrations
96
-
97
- Mercur 2.1 ships several new migrations on the `seller` module. All are non-destructive. Run:
98
-
99
- ```bash
100
- bun run medusa db:migrate
101
- ```
102
-
103
- ## Full changelog
104
-
105
- The complete 2.1 changelog is published with the [GitHub release](https://github.com/mercurjs/mercur/releases/tag/v2.1.1).
@@ -1,58 +0,0 @@
1
- ---
2
- title: Migration Overview
3
- description: Understand what changes between Mercur 1.x and 2.0 and how to migrate your project.
4
- ---
5
-
6
- # Migration Overview
7
-
8
- Mercur 2.0 replaces the monolithic plugin architecture (`@mercurjs/b2c-core`) with a block-based model (`@mercurjs/core` + registry blocks).
9
-
10
- This guide is about **porting your existing 1.x code to a 2.0 project**. For setting up a fresh 2.0 project, see [Installation](/rc/learn/installation).
11
-
12
- <Tip>
13
- If you're using an AI Agent/IDE (Claude Code, Cursor, or similar), your project includes a `migration-guide` skill that can analyze your 1.x Mercur project and walk you through the migration step by step.
14
- </Tip>
15
-
16
- ## What Replaced What
17
-
18
- | 1.x | 2.0 |
19
- |-------|--------|
20
- | `@mercurjs/b2c-core` (monolithic) | `@mercurjs/core` — all core modules built in |
21
- | `@mercurjs/commission` (separate) | Built into core |
22
- | `@mercurjs/algolia`, reviews, requests | Registry blocks (`mercurjs add ...`) |
23
- | `@medusajs/admin-vite-plugin` | `@mercurjs/dashboard-sdk` (virtual modules) |
24
- | `@medusajs/js-sdk` (manual hooks) | `@mercurjs/client` (generated typed client) |
25
- | Custom admin/vendor pages | `@mercurjs/admin` / `@mercurjs/vendor` — complete panels out of the box |
26
- | `apps/backend/` | `packages/api/` |
27
- | `src/routes/` (admin) | `src/pages/` (file-based routing) |
28
- | Yarn + Turbo | bun (recommended) |
29
-
30
- ## What Didn't Change
31
-
32
- - MedusaJS v2 foundation (modules, workflows, links, subscribers, API routes)
33
- - Data model patterns (MikroORM, service layer)
34
- - Environment variables (`DATABASE_URL`, CORS, secrets — all the same)
35
-
36
- ## What You Need to Migrate
37
-
38
- **Most users don't need to migrate much.** Core-plugin and the official registry blocks cover most standard marketplace functionality. Core-admin/vendor panels provide 34+ pages out of the box.
39
-
40
- You only need to port:
41
- - **Custom modules** — business-specific modules not covered by core or blocks
42
- - **Custom workflows and routes** — your own endpoints and business logic
43
- - **Custom dashboard pages** — only if you have domain-specific pages not in core-admin/vendor
44
-
45
- <Warning>
46
- Current migration exceptions:
47
-
48
- - `TaxCode` does not have a 2.0 equivalent today and requires manual migration.
49
- - `SecondaryCategory` does not yet have full 1.x parity and may require manual migration for now.
50
- - The 1.x product attribute system is not carried over 1:1, so product attributes may require manual migration for now.
51
-
52
- See [From 1.x to 2.0](/migrations/from-1-x-to-2-0) for the full migration guidance and current status.
53
- </Warning>
54
-
55
- ## Next Steps
56
-
57
- - [From 2.0 to 2.1](/migrations/from-2-0-to-2-1) — package rename (`@mercurjs/core-plugin` → `@mercurjs/core`) and a `db:migrate` step
58
- - [From 1.x to 2.0](/migrations/from-1-x-to-2-0) — full guide for porting an existing 1.x project
@@ -1,136 +0,0 @@
1
- ---
2
- title: "Search"
3
- api: "POST /store/search"
4
- description: "Query the search index across products and offers."
5
- ---
6
-
7
- Runs a full-text query against the active search provider's index of products and offers.
8
-
9
- <Note>
10
- Customer authentication is optional. When a customer token is provided together with `region_id`, the customer's group memberships enter the pricing context, so hits can carry group-specific `calculated_price` values.
11
- </Note>
12
-
13
- ## Body parameters
14
-
15
- <ParamField body="q" type="string" default="">
16
- Search query.
17
- </ParamField>
18
-
19
- <ParamField body="limit" type="number" default="12">
20
- Maximum number of hits to return; minimum `1`, maximum `100`.
21
- </ParamField>
22
-
23
- <ParamField body="offset" type="number" default="0">
24
- Number of hits to skip before collecting results.
25
- </ParamField>
26
-
27
- <ParamField body="region_id" type="string">
28
- Region used to build the pricing context; without it, hits have no `calculated_price`.
29
- </ParamField>
30
-
31
- <ParamField body="country_code" type="string">
32
- Country used for the tax context when the region has automatic taxes.
33
- </ParamField>
34
-
35
- <ParamField body="province" type="string">
36
- Province used for the tax context.
37
- </ParamField>
38
-
39
- <ParamField body="filters" type="object">
40
- Provider-owned filter object passed straight to the active search provider, which defines its shape (for example category, collection, or attribute filters).
41
- </ParamField>
42
-
43
- ## Response
44
-
45
- <ResponseField name="hits" type="object[]">
46
- <Expandable title="properties">
47
- <ResponseField name="id" type="string">The document's ID.</ResponseField>
48
- <ResponseField name="type" type="string">One of `product` or `offer`.</ResponseField>
49
- <ResponseField name="title" type="string">Display title.</ResponseField>
50
- <ResponseField name="description" type="string">Description text.</ResponseField>
51
- <ResponseField name="handle" type="string">URL-safe handle.</ResponseField>
52
- <ResponseField name="thumbnail" type="string">Thumbnail URL.</ResponseField>
53
- <ResponseField name="seller_handle" type="string">Handle of the owning seller.</ResponseField>
54
- <ResponseField name="collection_id" type="string">ID of the product's collection.</ResponseField>
55
- <ResponseField name="collection" type="string">Title of the product's collection.</ResponseField>
56
- <ResponseField name="category_ids" type="string[]">IDs of the product's categories.</ResponseField>
57
- <ResponseField name="categories" type="string[]">Names of the product's categories.</ResponseField>
58
- <ResponseField name="product_id" type="string">Product ID (offer documents).</ResponseField>
59
- <ResponseField name="variant_id" type="string">Variant ID (offer documents).</ResponseField>
60
- <ResponseField name="sku" type="string">Offer SKU (offer documents).</ResponseField>
61
- <ResponseField name="attributes" type="object[]">Filterable attributes with their values.</ResponseField>
62
- <ResponseField name="calculated_price" type="object | null">
63
- Price for the requested pricing context, with `calculated_amount`, `original_amount`, and `currency_code`.
64
- </ResponseField>
65
- </Expandable>
66
- </ResponseField>
67
-
68
- <ResponseField name="count" type="number">Total number of matching documents.</ResponseField>
69
- <ResponseField name="limit" type="number">The applied limit.</ResponseField>
70
- <ResponseField name="offset" type="number">The applied offset.</ResponseField>
71
-
72
- <ResponseField name="facets" type="object">
73
- <Expandable title="properties">
74
- <ResponseField name="collections" type="object[]">Collection facets with `id`, `label`, and `count`.</ResponseField>
75
- <ResponseField name="categories" type="object[]">Category facets with `id`, `label`, and `count`.</ResponseField>
76
- <ResponseField name="attributes" type="object[]">Attribute facets with `handle`, `label`, and value counts.</ResponseField>
77
- </Expandable>
78
- </ResponseField>
79
-
80
- <RequestExample>
81
- ```bash cURL
82
- curl -X POST 'http://localhost:9000/store/search' \
83
- -H 'Content-Type: application/json' \
84
- -H 'x-publishable-api-key: pk_01JB2K3XYZ' \
85
- -d '{"q": "linen shirt", "limit": 12, "region_id": "reg_01JB2K4S1T"}'
86
- ```
87
-
88
- ```ts JS Client
89
- const { hits, count, facets } = await client.store.search.mutate({
90
- q: "linen shirt",
91
- limit: 12,
92
- region_id: "reg_01JB2K4S1T",
93
- })
94
- ```
95
- </RequestExample>
96
-
97
- <ResponseExample>
98
- ```json 200
99
- {
100
- "hits": [
101
- {
102
- "id": "offer_01JB2K6G5H",
103
- "type": "offer",
104
- "title": "Linen Shirt",
105
- "handle": "linen-shirt",
106
- "thumbnail": "https://cdn.example.com/linen-shirt.png",
107
- "seller_handle": "nordic-textiles",
108
- "product_id": "prod_01JB2K5M8N",
109
- "variant_id": "variant_01JB2K6E4F",
110
- "sku": "NT-LINEN-M",
111
- "category_ids": ["pcat_01JB2K6A2B"],
112
- "categories": ["Shirts"],
113
- "calculated_price": {
114
- "calculated_amount": 4500,
115
- "original_amount": 5000,
116
- "currency_code": "eur"
117
- }
118
- }
119
- ],
120
- "count": 42,
121
- "limit": 12,
122
- "offset": 0,
123
- "facets": {
124
- "collections": [],
125
- "categories": [{ "id": "pcat_01JB2K6A2B", "label": "Shirts", "count": 42 }],
126
- "attributes": [
127
- {
128
- "handle": "material",
129
- "label": "Material",
130
- "values": [{ "id": "attrval_01JB2K7C2D", "label": "Linen", "count": 30 }]
131
- }
132
- ]
133
- }
134
- }
135
- ```
136
- </ResponseExample>