@mercurjs/docs 2.2.0-canary.40

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 (283) hide show
  1. package/README.md +24 -0
  2. package/content/blocks.mdx +209 -0
  3. package/content/learn/architecture.mdx +215 -0
  4. package/content/learn/attributes.mdx +89 -0
  5. package/content/learn/blocks.mdx +99 -0
  6. package/content/learn/commissions.mdx +175 -0
  7. package/content/learn/concepts.mdx +84 -0
  8. package/content/learn/installation.mdx +117 -0
  9. package/content/learn/introduction.mdx +71 -0
  10. package/content/learn/offers.mdx +78 -0
  11. package/content/learn/order-groups.mdx +114 -0
  12. package/content/learn/payouts.mdx +175 -0
  13. package/content/learn/product-requests.mdx +82 -0
  14. package/content/learn/products.mdx +79 -0
  15. package/content/learn/registry.mdx +155 -0
  16. package/content/learn/seller-members.mdx +62 -0
  17. package/content/learn/sellers.mdx +118 -0
  18. package/content/migration/from-1-x-to-2-0.mdx +152 -0
  19. package/content/migration/from-2-0-to-2-1.mdx +105 -0
  20. package/content/migration/overview.mdx +58 -0
  21. package/content/references/api/admin/commission-rates/batch-commission-rules.mdx +70 -0
  22. package/content/references/api/admin/commission-rates/create-commission-rate.mdx +95 -0
  23. package/content/references/api/admin/commission-rates/delete-commission-rate.mdx +40 -0
  24. package/content/references/api/admin/commission-rates/list-commission-rates.mdx +92 -0
  25. package/content/references/api/admin/commission-rates/retrieve-commission-rate.mdx +70 -0
  26. package/content/references/api/admin/commission-rates/update-commission-rate.mdx +84 -0
  27. package/content/references/api/admin/members/list-members.mdx +61 -0
  28. package/content/references/api/admin/offers/batch-create-offers.mdx +130 -0
  29. package/content/references/api/admin/offers/delete-offer.mdx +40 -0
  30. package/content/references/api/admin/offers/list-offers.mdx +106 -0
  31. package/content/references/api/admin/offers/retrieve-offer.mdx +82 -0
  32. package/content/references/api/admin/order-groups/list-order-groups.mdx +77 -0
  33. package/content/references/api/admin/order-groups/retrieve-order-group.mdx +56 -0
  34. package/content/references/api/admin/orders/get-order-commission-lines.mdx +65 -0
  35. package/content/references/api/admin/orders/get-order-order-group.mdx +56 -0
  36. package/content/references/api/admin/orders/list-orders.mdx +79 -0
  37. package/content/references/api/admin/payouts/list-payouts.mdx +75 -0
  38. package/content/references/api/admin/payouts/retrieve-payout.mdx +62 -0
  39. package/content/references/api/admin/product-attributes/create-attribute-value.mdx +76 -0
  40. package/content/references/api/admin/product-attributes/create-product-attribute.mdx +99 -0
  41. package/content/references/api/admin/product-attributes/delete-attribute-value.mdx +52 -0
  42. package/content/references/api/admin/product-attributes/delete-product-attribute.mdx +40 -0
  43. package/content/references/api/admin/product-attributes/list-product-attributes.mdx +91 -0
  44. package/content/references/api/admin/product-attributes/retrieve-product-attribute.mdx +81 -0
  45. package/content/references/api/admin/product-attributes/update-attribute-value.mdx +66 -0
  46. package/content/references/api/admin/product-attributes/update-product-attribute.mdx +76 -0
  47. package/content/references/api/admin/product-changes/cancel-product-change.mdx +68 -0
  48. package/content/references/api/admin/product-changes/confirm-product-change.mdx +47 -0
  49. package/content/references/api/admin/products/batch-product-attributes.mdx +96 -0
  50. package/content/references/api/admin/products/confirm-product.mdx +59 -0
  51. package/content/references/api/admin/products/create-product-variant.mdx +78 -0
  52. package/content/references/api/admin/products/create-product.mdx +169 -0
  53. package/content/references/api/admin/products/delete-product-variant.mdx +48 -0
  54. package/content/references/api/admin/products/delete-product.mdx +40 -0
  55. package/content/references/api/admin/products/list-product-variants.mdx +91 -0
  56. package/content/references/api/admin/products/list-products.mdx +109 -0
  57. package/content/references/api/admin/products/preview-product.mdx +78 -0
  58. package/content/references/api/admin/products/reject-product.mdx +59 -0
  59. package/content/references/api/admin/products/request-product-changes.mdx +59 -0
  60. package/content/references/api/admin/products/retrieve-product-variant.mdx +73 -0
  61. package/content/references/api/admin/products/retrieve-product.mdx +96 -0
  62. package/content/references/api/admin/products/set-product-sellers.mdx +47 -0
  63. package/content/references/api/admin/products/update-product-variant.mdx +89 -0
  64. package/content/references/api/admin/products/update-product.mdx +133 -0
  65. package/content/references/api/admin/sellers/add-seller-member.mdx +63 -0
  66. package/content/references/api/admin/sellers/approve-seller.mdx +54 -0
  67. package/content/references/api/admin/sellers/create-seller.mdx +100 -0
  68. package/content/references/api/admin/sellers/delete-member-invite.mdx +42 -0
  69. package/content/references/api/admin/sellers/delete-professional-details.mdx +52 -0
  70. package/content/references/api/admin/sellers/invite-seller-member.mdx +63 -0
  71. package/content/references/api/admin/sellers/list-member-invites.mdx +71 -0
  72. package/content/references/api/admin/sellers/list-seller-members.mdx +71 -0
  73. package/content/references/api/admin/sellers/list-seller-products.mdx +85 -0
  74. package/content/references/api/admin/sellers/list-sellers.mdx +96 -0
  75. package/content/references/api/admin/sellers/remove-seller-member.mdx +42 -0
  76. package/content/references/api/admin/sellers/resend-member-invite.mdx +55 -0
  77. package/content/references/api/admin/sellers/retrieve-seller.mdx +81 -0
  78. package/content/references/api/admin/sellers/suspend-seller.mdx +60 -0
  79. package/content/references/api/admin/sellers/terminate-seller.mdx +60 -0
  80. package/content/references/api/admin/sellers/unsuspend-seller.mdx +52 -0
  81. package/content/references/api/admin/sellers/unterminate-seller.mdx +52 -0
  82. package/content/references/api/admin/sellers/update-seller.mdx +83 -0
  83. package/content/references/api/admin/sellers/upsert-payment-details.mdx +88 -0
  84. package/content/references/api/admin/sellers/upsert-professional-details.mdx +78 -0
  85. package/content/references/api/admin/sellers/upsert-seller-address.mdx +91 -0
  86. package/content/references/api/admin.mdx +134 -0
  87. package/content/references/api/conventions.mdx +109 -0
  88. package/content/references/api/store/carts/add-line-item.mdx +115 -0
  89. package/content/references/api/store/carts/add-shipping-methods.mdx +84 -0
  90. package/content/references/api/store/carts/apply-promotions.mdx +83 -0
  91. package/content/references/api/store/carts/complete-cart.mdx +98 -0
  92. package/content/references/api/store/offers/list-offers.mdx +161 -0
  93. package/content/references/api/store/offers/retrieve-offer.mdx +112 -0
  94. package/content/references/api/store/order-groups/list-order-groups.mdx +105 -0
  95. package/content/references/api/store/order-groups/retrieve-order-group.mdx +78 -0
  96. package/content/references/api/store/product-attributes/list-product-attributes.mdx +134 -0
  97. package/content/references/api/store/product-attributes/retrieve-product-attribute.mdx +78 -0
  98. package/content/references/api/store/product-categories/list-product-categories.mdx +126 -0
  99. package/content/references/api/store/product-categories/retrieve-product-category.mdx +79 -0
  100. package/content/references/api/store/products/list-products.mdx +184 -0
  101. package/content/references/api/store/products/retrieve-product.mdx +107 -0
  102. package/content/references/api/store/search/search.mdx +136 -0
  103. package/content/references/api/store/sellers/list-sellers.mdx +105 -0
  104. package/content/references/api/store/sellers/retrieve-seller.mdx +62 -0
  105. package/content/references/api/store/shipping-options/list-shipping-options.mdx +74 -0
  106. package/content/references/api/store.mdx +67 -0
  107. package/content/references/api/vendor/members/accept-member-invite.mdx +65 -0
  108. package/content/references/api/vendor/members/retrieve-current-member.mdx +51 -0
  109. package/content/references/api/vendor/members/update-current-member.mdx +70 -0
  110. package/content/references/api/vendor/offers/batch-create-offers.mdx +123 -0
  111. package/content/references/api/vendor/offers/batch-offer-inventory-items.mdx +103 -0
  112. package/content/references/api/vendor/offers/create-offer.mdx +141 -0
  113. package/content/references/api/vendor/offers/delete-offer.mdx +51 -0
  114. package/content/references/api/vendor/offers/list-offers.mdx +125 -0
  115. package/content/references/api/vendor/offers/retrieve-offer.mdx +74 -0
  116. package/content/references/api/vendor/offers/update-offer.mdx +82 -0
  117. package/content/references/api/vendor/orders/cancel-fulfillment.mdx +63 -0
  118. package/content/references/api/vendor/orders/cancel-order.mdx +56 -0
  119. package/content/references/api/vendor/orders/complete-order.mdx +55 -0
  120. package/content/references/api/vendor/orders/create-fulfillment.mdx +76 -0
  121. package/content/references/api/vendor/orders/create-shipment.mdx +99 -0
  122. package/content/references/api/vendor/orders/get-order-commission-lines.mdx +66 -0
  123. package/content/references/api/vendor/orders/list-order-changes.mdx +75 -0
  124. package/content/references/api/vendor/orders/list-orders.mdx +103 -0
  125. package/content/references/api/vendor/orders/mark-fulfillment-delivered.mdx +62 -0
  126. package/content/references/api/vendor/orders/preview-order.mdx +65 -0
  127. package/content/references/api/vendor/orders/retrieve-order.mdx +84 -0
  128. package/content/references/api/vendor/payout-accounts/create-onboarding.mdx +68 -0
  129. package/content/references/api/vendor/payout-accounts/create-payout-account.mdx +59 -0
  130. package/content/references/api/vendor/payout-accounts/retrieve-payout-account-by-id.mdx +60 -0
  131. package/content/references/api/vendor/payout-accounts/retrieve-payout-account.mdx +77 -0
  132. package/content/references/api/vendor/payouts/list-payouts.mdx +90 -0
  133. package/content/references/api/vendor/payouts/retrieve-payout.mdx +63 -0
  134. package/content/references/api/vendor/product-attributes/list-product-attributes.mdx +135 -0
  135. package/content/references/api/vendor/product-attributes/retrieve-product-attribute.mdx +71 -0
  136. package/content/references/api/vendor/product-variants/list-variants.mdx +136 -0
  137. package/content/references/api/vendor/products/batch-product-attributes.mdx +104 -0
  138. package/content/references/api/vendor/products/cancel-product-change.mdx +62 -0
  139. package/content/references/api/vendor/products/create-product-variant.mdx +92 -0
  140. package/content/references/api/vendor/products/create-product.mdx +197 -0
  141. package/content/references/api/vendor/products/delete-product-variant.mdx +68 -0
  142. package/content/references/api/vendor/products/delete-product.mdx +62 -0
  143. package/content/references/api/vendor/products/list-product-variants.mdx +114 -0
  144. package/content/references/api/vendor/products/list-products.mdx +163 -0
  145. package/content/references/api/vendor/products/preview-product.mdx +61 -0
  146. package/content/references/api/vendor/products/retrieve-product-variant.mdx +76 -0
  147. package/content/references/api/vendor/products/retrieve-product.mdx +69 -0
  148. package/content/references/api/vendor/products/update-product-variant.mdx +104 -0
  149. package/content/references/api/vendor/products/update-product.mdx +148 -0
  150. package/content/references/api/vendor/sellers/create-seller.mdx +150 -0
  151. package/content/references/api/vendor/sellers/delete-professional-details.mdx +54 -0
  152. package/content/references/api/vendor/sellers/invite-seller-member.mdx +67 -0
  153. package/content/references/api/vendor/sellers/list-member-invites.mdx +82 -0
  154. package/content/references/api/vendor/sellers/list-seller-members.mdx +80 -0
  155. package/content/references/api/vendor/sellers/list-sellers.mdx +71 -0
  156. package/content/references/api/vendor/sellers/remove-seller-member.mdx +48 -0
  157. package/content/references/api/vendor/sellers/retrieve-current-seller-member.mdx +59 -0
  158. package/content/references/api/vendor/sellers/retrieve-current-seller.mdx +69 -0
  159. package/content/references/api/vendor/sellers/select-seller.mdx +44 -0
  160. package/content/references/api/vendor/sellers/update-current-seller.mdx +108 -0
  161. package/content/references/api/vendor/sellers/update-member-role.mdx +51 -0
  162. package/content/references/api/vendor/sellers/upsert-payment-details.mdx +74 -0
  163. package/content/references/api/vendor/sellers/upsert-professional-details.mdx +70 -0
  164. package/content/references/api/vendor/sellers/upsert-seller-address.mdx +81 -0
  165. package/content/references/api/vendor.mdx +150 -0
  166. package/content/references/configuration.mdx +155 -0
  167. package/content/references/modules/commission.mdx +106 -0
  168. package/content/references/modules/custom-fields.mdx +45 -0
  169. package/content/references/modules/media.mdx +55 -0
  170. package/content/references/modules/offer.mdx +64 -0
  171. package/content/references/modules/payout.mdx +121 -0
  172. package/content/references/modules/product-attribute.mdx +111 -0
  173. package/content/references/modules/product-edit.mdx +80 -0
  174. package/content/references/modules/search.mdx +112 -0
  175. package/content/references/modules/seller.mdx +175 -0
  176. package/content/references/overview.mdx +70 -0
  177. package/content/references/workflows/cart/add-seller-shipping-method-to-cart.mdx +44 -0
  178. package/content/references/workflows/cart/complete-cart-with-split-orders.mdx +36 -0
  179. package/content/references/workflows/cart/list-seller-shipping-options-for-cart.mdx +39 -0
  180. package/content/references/workflows/cart/update-cart-seller-promotions.mdx +42 -0
  181. package/content/references/workflows/commission/batch-commission-rules.mdx +45 -0
  182. package/content/references/workflows/commission/create-commission-rates.mdx +41 -0
  183. package/content/references/workflows/commission/delete-commission-rates.mdx +34 -0
  184. package/content/references/workflows/commission/refresh-order-commission-lines.mdx +30 -0
  185. package/content/references/workflows/commission/update-commission-rates.mdx +35 -0
  186. package/content/references/workflows/media/set-category-images.mdx +41 -0
  187. package/content/references/workflows/media/set-collection-images.mdx +41 -0
  188. package/content/references/workflows/member/accept-member-invite.mdx +33 -0
  189. package/content/references/workflows/member/add-seller-member.mdx +30 -0
  190. package/content/references/workflows/member/create-member-invites.mdx +34 -0
  191. package/content/references/workflows/member/delete-member-invite.mdx +24 -0
  192. package/content/references/workflows/member/remove-seller-member.mdx +28 -0
  193. package/content/references/workflows/member/resend-member-invite.mdx +28 -0
  194. package/content/references/workflows/member/update-member-role.mdx +28 -0
  195. package/content/references/workflows/member/update-member.mdx +35 -0
  196. package/content/references/workflows/offer/batch-offer-inventory-items.mdx +58 -0
  197. package/content/references/workflows/offer/create-offers.mdx +63 -0
  198. package/content/references/workflows/offer/delete-offers.mdx +35 -0
  199. package/content/references/workflows/offer/update-offers.mdx +51 -0
  200. package/content/references/workflows/order/cancel-order-fulfillment.mdx +34 -0
  201. package/content/references/workflows/order/confirm-claim-request.mdx +25 -0
  202. package/content/references/workflows/order/confirm-exchange-request.mdx +25 -0
  203. package/content/references/workflows/order/confirm-order-edit-request.mdx +25 -0
  204. package/content/references/workflows/order/confirm-return-receive.mdx +25 -0
  205. package/content/references/workflows/order/create-order-fulfillment.mdx +45 -0
  206. package/content/references/workflows/order-group/get-order-group-detail.mdx +29 -0
  207. package/content/references/workflows/order-group/get-order-groups-list.mdx +36 -0
  208. package/content/references/workflows/overview.mdx +72 -0
  209. package/content/references/workflows/payout/create-onboarding.mdx +36 -0
  210. package/content/references/workflows/payout/create-payout-account.mdx +33 -0
  211. package/content/references/workflows/payout/create-payout.mdx +30 -0
  212. package/content/references/workflows/payout/process-payout-for-webhook.mdx +32 -0
  213. package/content/references/workflows/product/confirm-products.mdx +46 -0
  214. package/content/references/workflows/product/create-products.mdx +63 -0
  215. package/content/references/workflows/product/link-sellers-to-product-category.mdx +40 -0
  216. package/content/references/workflows/product/link-sellers-to-product.mdx +40 -0
  217. package/content/references/workflows/product/reject-product.mdx +46 -0
  218. package/content/references/workflows/product/request-product-change.mdx +46 -0
  219. package/content/references/workflows/product-attribute/add-product-attributes-to-product.mdx +49 -0
  220. package/content/references/workflows/product-attribute/create-and-link-product-attributes-to-product.mdx +46 -0
  221. package/content/references/workflows/product-attribute/create-product-attribute-values.mdx +43 -0
  222. package/content/references/workflows/product-attribute/create-product-attributes.mdx +56 -0
  223. package/content/references/workflows/product-attribute/delete-product-attribute-values.mdx +30 -0
  224. package/content/references/workflows/product-attribute/delete-product-attributes.mdx +30 -0
  225. package/content/references/workflows/product-attribute/remove-product-attributes-from-product.mdx +29 -0
  226. package/content/references/workflows/product-attribute/update-product-attribute-values.mdx +44 -0
  227. package/content/references/workflows/product-attribute/update-product-attributes-on-product.mdx +41 -0
  228. package/content/references/workflows/product-attribute/update-product-attributes.mdx +48 -0
  229. package/content/references/workflows/product-attribute/upsert-product-attribute-values.mdx +43 -0
  230. package/content/references/workflows/product-edit/auto-confirm-product-change.mdx +39 -0
  231. package/content/references/workflows/product-edit/cancel-product-change.mdx +49 -0
  232. package/content/references/workflows/product-edit/confirm-product-change.mdx +57 -0
  233. package/content/references/workflows/product-edit/create-product-change.mdx +72 -0
  234. package/content/references/workflows/product-edit/reject-product-change.mdx +54 -0
  235. package/content/references/workflows/product-edit/stage-product-change.mdx +75 -0
  236. package/content/references/workflows/seller/approve-seller.mdx +34 -0
  237. package/content/references/workflows/seller/create-seller-account.mdx +59 -0
  238. package/content/references/workflows/seller/create-seller-defaults.mdx +22 -0
  239. package/content/references/workflows/seller/create-sellers.mdx +65 -0
  240. package/content/references/workflows/seller/delete-seller-professional-details.mdx +37 -0
  241. package/content/references/workflows/seller/delete-sellers.mdx +24 -0
  242. package/content/references/workflows/seller/invite-seller.mdx +28 -0
  243. package/content/references/workflows/seller/suspend-seller.mdx +35 -0
  244. package/content/references/workflows/seller/terminate-seller.mdx +35 -0
  245. package/content/references/workflows/seller/unsuspend-seller.mdx +34 -0
  246. package/content/references/workflows/seller/unterminate-seller.mdx +34 -0
  247. package/content/references/workflows/seller/update-seller-address.mdx +55 -0
  248. package/content/references/workflows/seller/update-seller-payment-details.mdx +52 -0
  249. package/content/references/workflows/seller/update-seller-professional-details.mdx +48 -0
  250. package/content/references/workflows/seller/update-sellers.mdx +57 -0
  251. package/content/resources/ai/llms.mdx +74 -0
  252. package/content/resources/ai/mcp.mdx +152 -0
  253. package/content/resources/ai/overview.mdx +97 -0
  254. package/content/resources/customization/custom-fields.mdx +182 -0
  255. package/content/resources/customization/extend-a-workflow.mdx +39 -0
  256. package/content/resources/customization/extending-panels.mdx +309 -0
  257. package/content/resources/deployment/medusa-cloud.mdx +167 -0
  258. package/content/resources/integrations/notifications.mdx +39 -0
  259. package/content/resources/integrations/search.mdx +122 -0
  260. package/content/resources/integrations/stripe-connect.mdx +395 -0
  261. package/content/resources/tutorials/add-a-block.mdx +74 -0
  262. package/content/resources/tutorials/attributes-and-variant-axes.mdx +111 -0
  263. package/content/resources/tutorials/build-a-block.mdx +134 -0
  264. package/content/resources/tutorials/configure-commissions.mdx +127 -0
  265. package/content/resources/tutorials/custom-api-route.mdx +142 -0
  266. package/content/resources/tutorials/custom-panel-page.mdx +78 -0
  267. package/content/resources/tutorials/first-marketplace.mdx +45 -0
  268. package/content/resources/tutorials/handle-product-requests.mdx +80 -0
  269. package/content/resources/tutorials/import-export-products.mdx +96 -0
  270. package/content/resources/tutorials/master-products-and-offers.mdx +89 -0
  271. package/content/resources/tutorials/recompose-a-page.mdx +129 -0
  272. package/content/resources/tutorials/replace-panel-components.mdx +116 -0
  273. package/content/resources/tutorials/seller-payouts-stripe.mdx +89 -0
  274. package/content/telemetry.mdx +67 -0
  275. package/content/tools/api-client.mdx +155 -0
  276. package/content/tools/cli.mdx +196 -0
  277. package/content/tools/dashboard-sdk.mdx +35 -0
  278. package/content/user-guide/admin/overview.mdx +23 -0
  279. package/content/user-guide/admin/stores.mdx +193 -0
  280. package/content/user-guide/vendor/overview.mdx +23 -0
  281. package/content/user-guide/vendor/stores.mdx +209 -0
  282. package/llms.txt +307 -0
  283. package/package.json +33 -0
@@ -0,0 +1,91 @@
1
+ ---
2
+ title: "Upsert Seller Address"
3
+ api: "POST /admin/sellers/{id}/address"
4
+ description: "Create or update a seller's address."
5
+ ---
6
+
7
+ Creates the seller's address if none exists, otherwise updates it.
8
+
9
+ ## Path parameters
10
+
11
+ <ParamField path="id" type="string" required>The seller's ID.</ParamField>
12
+
13
+ ## Query parameters
14
+
15
+ <ParamField query="fields" type="string">Comma-separated list of fields to include, prefix with `+`/`-` to add or remove from defaults.</ParamField>
16
+
17
+ ## Body parameters
18
+
19
+ <ParamField body="name" type="string">Label for the address.</ParamField>
20
+ <ParamField body="company" type="string">Company name.</ParamField>
21
+ <ParamField body="first_name" type="string">First name of the contact person.</ParamField>
22
+ <ParamField body="last_name" type="string">Last name of the contact person.</ParamField>
23
+ <ParamField body="address_1" type="string">First address line.</ParamField>
24
+ <ParamField body="address_2" type="string">Second address line.</ParamField>
25
+ <ParamField body="city" type="string">City.</ParamField>
26
+ <ParamField body="country_code" type="string">Two-letter ISO country code.</ParamField>
27
+ <ParamField body="province" type="string">Province or state.</ParamField>
28
+ <ParamField body="postal_code" type="string">Postal code.</ParamField>
29
+ <ParamField body="phone" type="string">Phone number for the address.</ParamField>
30
+ <ParamField body="metadata" type="object">Custom key-value data.</ParamField>
31
+ <ParamField body="additional_data" type="object">Extra data passed to workflow hooks.</ParamField>
32
+
33
+ ## Response
34
+
35
+ <ResponseField name="seller" type="object">
36
+ <Expandable title="properties">
37
+ <ResponseField name="id" type="string">The seller's ID.</ResponseField>
38
+ <ResponseField name="address" type="object">
39
+ <Expandable title="properties">
40
+ <ResponseField name="address_1" type="string">First address line.</ResponseField>
41
+ <ResponseField name="city" type="string">City.</ResponseField>
42
+ <ResponseField name="country_code" type="string">Two-letter ISO country code.</ResponseField>
43
+ <ResponseField name="postal_code" type="string">Postal code.</ResponseField>
44
+ </Expandable>
45
+ </ResponseField>
46
+ <ResponseField name="updated_at" type="string">Last update timestamp.</ResponseField>
47
+ </Expandable>
48
+ </ResponseField>
49
+
50
+ <RequestExample>
51
+ ```bash cURL
52
+ curl -X POST 'http://localhost:9000/admin/sellers/sel_01HXYZABCDEF/address' \
53
+ -H 'Authorization: Bearer <token>' \
54
+ -H 'Content-Type: application/json' \
55
+ -d '{
56
+ "address_1": "123 Market St",
57
+ "city": "San Francisco",
58
+ "country_code": "us",
59
+ "postal_code": "94103"
60
+ }'
61
+ ```
62
+
63
+ ```ts JS Client
64
+ const { seller } = await client.admin.sellers.$id.address.mutate({
65
+ $id: "sel_01HXYZABCDEF",
66
+ address_1: "123 Market St",
67
+ city: "San Francisco",
68
+ country_code: "us",
69
+ postal_code: "94103",
70
+ })
71
+ ```
72
+ </RequestExample>
73
+
74
+ <ResponseExample>
75
+ ```json 200
76
+ {
77
+ "seller": {
78
+ "id": "sel_01HXYZABCDEF",
79
+ "name": "Acme",
80
+ "status": "open",
81
+ "address": {
82
+ "address_1": "123 Market St",
83
+ "city": "San Francisco",
84
+ "country_code": "us",
85
+ "postal_code": "94103"
86
+ },
87
+ "updated_at": "2026-06-12T10:30:00.000Z"
88
+ }
89
+ }
90
+ ```
91
+ </ResponseExample>
@@ -0,0 +1,134 @@
1
+ ---
2
+ title: "Admin API"
3
+ description: "Operator routes under /admin/* — sellers, commissions, payouts, master catalog, and marketplace-wide orders."
4
+ ---
5
+
6
+ The Admin API is the marketplace operator's surface. It extends Medusa's standard admin routes with the marketplace domains below; everything else (regions, currencies, users, API keys, …) comes from Medusa core unchanged.
7
+
8
+ Authentication and shared conventions are covered in [API conventions](/rc/references/api/conventions).
9
+
10
+ ## Sellers
11
+
12
+ | Method | Path | Purpose |
13
+ | --- | --- | --- |
14
+ | `GET` `POST` | `/admin/sellers` | List sellers / create a seller |
15
+ | `GET` `POST` | `/admin/sellers/:id` | Retrieve / update a seller |
16
+ | `POST` | `/admin/sellers/:id/approve` | Approve a pending seller |
17
+ | `POST` | `/admin/sellers/:id/suspend` | Suspend a seller |
18
+ | `POST` | `/admin/sellers/:id/unsuspend` | Lift a suspension |
19
+ | `POST` | `/admin/sellers/:id/terminate` | Terminate a seller |
20
+ | `POST` | `/admin/sellers/:id/unterminate` | Reverse a termination |
21
+ | `POST` | `/admin/sellers/:id/address` | Upsert the seller address |
22
+ | `POST` | `/admin/sellers/:id/payment-details` | Upsert payment details |
23
+ | `POST` `DELETE` | `/admin/sellers/:id/professional-details` | Upsert / remove professional details |
24
+ | `GET` | `/admin/sellers/:id/products` | List the seller's products |
25
+
26
+ ### Members and invites
27
+
28
+ | Method | Path | Purpose |
29
+ | --- | --- | --- |
30
+ | `GET` | `/admin/members` | List members across all sellers |
31
+ | `GET` `POST` | `/admin/sellers/:id/members` | List / add a member |
32
+ | `DELETE` | `/admin/sellers/:id/members/:member_id` | Remove a member |
33
+ | `POST` | `/admin/sellers/:id/members/invite` | Invite a member |
34
+ | `GET` | `/admin/sellers/:id/members/invites` | List pending invites |
35
+ | `DELETE` | `/admin/sellers/:id/members/invites/:invite_id` | Revoke an invite |
36
+ | `POST` | `/admin/sellers/:id/members/invites/:invite_id/resend` | Resend an invite |
37
+
38
+ ## Commission rates
39
+
40
+ | Method | Path | Purpose |
41
+ | --- | --- | --- |
42
+ | `GET` `POST` | `/admin/commission-rates` | List rates (supports the `scope_type` filter) / create a rate |
43
+ | `GET` `POST` `DELETE` | `/admin/commission-rates/:id` | Retrieve / update / delete a rate |
44
+ | `POST` | `/admin/commission-rates/:id/rules` | Batch add and remove rules on a rate |
45
+
46
+ ## Payouts
47
+
48
+ | Method | Path | Purpose |
49
+ | --- | --- | --- |
50
+ | `GET` | `/admin/payouts` | List payouts across the marketplace |
51
+ | `GET` | `/admin/payouts/:id` | Retrieve a payout |
52
+
53
+ ## Products (master catalog)
54
+
55
+ Products are shared catalog records — see the [master products model](/rc/references/modules/product-edit#the-master-products-model).
56
+
57
+ | Method | Path | Purpose |
58
+ | --- | --- | --- |
59
+ | `GET` `POST` | `/admin/products` | List / create a product (`seller_ids` sets selling eligibility) |
60
+ | `GET` `POST` `DELETE` | `/admin/products/:id` | Retrieve / update / delete a product |
61
+ | `GET` | `/admin/products/:id/preview` | Preview the product with pending changes applied |
62
+ | `POST` | `/admin/products/:id/confirm` | Confirm the pending change |
63
+ | `POST` | `/admin/products/:id/reject` | Reject the pending change |
64
+ | `POST` | `/admin/products/:id/request-changes` | Send a change back to the seller for action |
65
+ | `POST` | `/admin/products/:id/sellers` | Set the selling-eligibility allowlist |
66
+ | `POST` | `/admin/products/:id/attributes/batch` | Batch add / update / remove product attributes |
67
+ | `GET` `POST` | `/admin/products/:id/variants` | List / create variants |
68
+ | `GET` `POST` `DELETE` | `/admin/products/:id/variants/:variant_id` | Retrieve / update / delete a variant |
69
+
70
+ ### Product changes
71
+
72
+ | Method | Path | Purpose |
73
+ | --- | --- | --- |
74
+ | `POST` | `/admin/product-changes/:id/confirm` | Confirm a change request directly |
75
+ | `POST` | `/admin/product-changes/:id/cancel` | Cancel a change request |
76
+
77
+ ## Offers
78
+
79
+ | Method | Path | Purpose |
80
+ | --- | --- | --- |
81
+ | `GET` | `/admin/offers` | List offers (supports `group_by_seller`) |
82
+ | `GET` `DELETE` | `/admin/offers/:id` | Retrieve / delete an offer |
83
+ | `POST` | `/admin/offers/batch` | Batch create offers |
84
+
85
+ ## Product attributes
86
+
87
+ | Method | Path | Purpose |
88
+ | --- | --- | --- |
89
+ | `GET` `POST` | `/admin/product-attributes` | List / create attributes |
90
+ | `GET` `POST` `DELETE` | `/admin/product-attributes/:id` | Retrieve / update / delete an attribute |
91
+ | `POST` | `/admin/product-attributes/:id/values` | Create a value |
92
+ | `POST` `DELETE` | `/admin/product-attributes/:id/values/:value_id` | Update / delete a value |
93
+
94
+ ## Categories and collections
95
+
96
+ | Method | Path | Purpose |
97
+ | --- | --- | --- |
98
+ | `GET` `POST` | `/admin/product-categories` | List / create categories (with media + icon) |
99
+ | `GET` `POST` `DELETE` | `/admin/product-categories/:id` | Retrieve / update / delete a category |
100
+ | `POST` | `/admin/product-categories/:id/products` | Batch link products |
101
+ | `POST` | `/admin/product-categories/:id/sellers` | Batch link sellers |
102
+ | `GET` `POST` | `/admin/collections` | List / create collections (with media + icon) |
103
+ | `GET` `POST` `DELETE` | `/admin/collections/:id` | Retrieve / update / delete a collection |
104
+
105
+ ## Orders and order groups
106
+
107
+ | Method | Path | Purpose |
108
+ | --- | --- | --- |
109
+ | `GET` | `/admin/orders` | List all orders across sellers |
110
+ | `GET` | `/admin/orders/:id/commission-lines` | Commission lines computed for an order |
111
+ | `GET` | `/admin/orders/:id/order-group` | The order group an order belongs to |
112
+ | `GET` | `/admin/order-groups` | List order groups |
113
+ | `GET` | `/admin/order-groups/:id` | Retrieve an order group with its child orders |
114
+
115
+ ### Order edits, claims, exchanges, returns
116
+
117
+ Mercur extends the Medusa RMA routes so they respect seller boundaries:
118
+
119
+ | Method | Path | Purpose |
120
+ | --- | --- | --- |
121
+ | `POST` | `/admin/order-edits/:id/items` | Add items to an order edit |
122
+ | `POST` | `/admin/order-edits/:id/confirm` | Confirm an order edit |
123
+ | `POST` | `/admin/claims/:id/outbound/items` | Add outbound items to a claim |
124
+ | `POST` `DELETE` | `/admin/claims/:id/request` | Request / cancel a claim |
125
+ | `POST` | `/admin/exchanges/:id/outbound/items` | Add outbound items to an exchange |
126
+ | `POST` `DELETE` | `/admin/exchanges/:id/request` | Request / cancel an exchange |
127
+ | `POST` | `/admin/returns/:id/receive/confirm` | Confirm receipt of a return |
128
+
129
+ ## Next steps
130
+
131
+ <CardGroup cols={2}>
132
+ <Card title="Vendor API" href="/rc/references/api/vendor" />
133
+ <Card title="API Client" href="/rc/tools/api-client" />
134
+ </CardGroup>
@@ -0,0 +1,109 @@
1
+ ---
2
+ title: "API conventions"
3
+ description: "Authentication, seller scoping, pagination, field selection, and webhooks — shared by every Mercur API surface."
4
+ ---
5
+
6
+ Mercur exposes three HTTP surfaces on the Medusa server. They share the same conventions for authentication, pagination, and field selection.
7
+
8
+ | Surface | Base path | Audience | Authentication |
9
+ | --- | --- | --- | --- |
10
+ | [Admin API](/rc/references/api/admin) | `/admin/*` | Marketplace operator | Medusa admin user (session or bearer) |
11
+ | [Vendor API](/rc/references/api/vendor) | `/vendor/*` | Sellers | Member auth + seller scoping (below) |
12
+ | [Store API](/rc/references/api/store) | `/store/*` | Storefront | Mostly public; customer auth where noted |
13
+
14
+ All requests and responses are JSON. The recommended way to call these APIs is the typed [`@mercurjs/client`](/rc/tools/api-client) — every route below maps 1:1 to a client call.
15
+
16
+ ## Authentication
17
+
18
+ ### Admin
19
+
20
+ Admin routes use standard Medusa admin authentication — log in via `/auth/user/emailpass`, then send the session cookie or a `Authorization: Bearer <token>` header.
21
+
22
+ ### Vendor
23
+
24
+ Vendor routes authenticate the **member** actor (`/auth/member/emailpass` to obtain a token) and are additionally scoped to a single seller:
25
+
26
+ 1. The request must carry an `x-seller-id` header (or a seller selected in the session via `POST /vendor/sellers/select`).
27
+ 2. Middleware verifies the authenticated member belongs to that seller and populates the request's seller context — every query and mutation on the surface is automatically filtered to that seller.
28
+ 3. The member's RBAC roles are resolved for the selected seller.
29
+
30
+ A handful of vendor routes are public by design: seller registration (`POST /vendor/sellers`), invite acceptance (`POST /vendor/members/invites/accept`), `GET /vendor/stores`, and `GET /vendor/feature-flags`.
31
+
32
+ ### Store
33
+
34
+ Store routes are public. Customer authentication (session or bearer) is **required** for `/store/order-groups` and **optional** for `/store/offers`, `/store/products`, and `/store/search` (it enriches the pricing context when present). Public seller routes only return sellers whose status is `open` and who are not inside a scheduled closure window.
35
+
36
+ ## Pagination
37
+
38
+ List endpoints use offset pagination with two query parameters:
39
+
40
+ ```
41
+ GET /admin/sellers?limit=20&offset=40
42
+ ```
43
+
44
+ | Parameter | Description | Default |
45
+ | --- | --- | --- |
46
+ | `limit` | Maximum number of records to return | 50 for most routes (some use 10, 20, or 200) |
47
+ | `offset` | Number of records to skip | 0 |
48
+
49
+ Every list response carries the paging envelope alongside the records:
50
+
51
+ ```json
52
+ {
53
+ "sellers": [ ... ],
54
+ "count": 133,
55
+ "offset": 40,
56
+ "limit": 20
57
+ }
58
+ ```
59
+
60
+ `count` is the total number of records matching the filters, so `offset + limit < count` means more pages exist.
61
+
62
+ ## Field selection
63
+
64
+ List and detail endpoints accept a `fields` query parameter to control which fields and relations are returned:
65
+
66
+ ```
67
+ GET /vendor/products?fields=id,title,+variants.sku,-description
68
+ ```
69
+
70
+ - `+field` adds a field or relation **on top of** the route's defaults.
71
+ - `-field` removes one from the defaults.
72
+ - A bare `field` (no prefix) **replaces** the default set entirely.
73
+
74
+ <Warning>
75
+ Mixing one unprefixed field into an otherwise-prefixed list switches the
76
+ whole parameter to replace mode and silently drops the route defaults.
77
+ Prefix every entry with `+` or `-` when you mean to merge.
78
+ </Warning>
79
+
80
+ ## Filtering and ordering
81
+
82
+ List endpoints accept entity-specific filter parameters (documented per route group), a free-text `q` search parameter where the entity has searchable fields, and `order` for sorting (`order=-created_at` for descending).
83
+
84
+ ## Errors
85
+
86
+ Errors follow Medusa's format:
87
+
88
+ ```json
89
+ {
90
+ "type": "invalid_data",
91
+ "message": "Seller with handle already exists"
92
+ }
93
+ ```
94
+
95
+ Common types: `invalid_data` (400), `unauthorized` (401), `not_allowed` (403), `not_found` (404). The typed client throws these as `ClientError`.
96
+
97
+ ## Webhooks
98
+
99
+ | Method | Path | Purpose |
100
+ | --- | --- | --- |
101
+ | `POST` | `/hooks/payout` | Payout provider webhook receiver. The registered provider (e.g. Stripe Connect) verifies the signature and resolves the event into a payout action. |
102
+
103
+ ## Next steps
104
+
105
+ <CardGroup cols={3}>
106
+ <Card title="Admin API" href="/rc/references/api/admin" />
107
+ <Card title="Vendor API" href="/rc/references/api/vendor" />
108
+ <Card title="Store API" href="/rc/references/api/store" />
109
+ </CardGroup>
@@ -0,0 +1,115 @@
1
+ ---
2
+ title: "Add Line Item"
3
+ api: "POST /store/carts/{id}/line-items"
4
+ description: "Add a seller offer to the cart as a line item."
5
+ ---
6
+
7
+ Adds an item to the cart by offer — Mercur resolves the offer's variant and stamps the `offer_id` on the line item so the cart can later split into per-seller orders.
8
+
9
+ <Note>
10
+ Unlike vanilla Medusa, this route takes an `offer_id` instead of a `variant_id`; an unknown offer returns a `404`.
11
+ </Note>
12
+
13
+ ## Path parameters
14
+
15
+ <ParamField path="id" type="string" required>
16
+ The cart's ID.
17
+ </ParamField>
18
+
19
+ ## Body parameters
20
+
21
+ <ParamField body="offer_id" type="string" required>
22
+ ID of the offer to add.
23
+ </ParamField>
24
+
25
+ <ParamField body="quantity" type="number" required>
26
+ Quantity to add; must be a positive integer.
27
+ </ParamField>
28
+
29
+ <ParamField body="unit_price" type="number">
30
+ Custom unit price overriding the offer's calculated price.
31
+ </ParamField>
32
+
33
+ <ParamField body="compare_at_unit_price" type="number">
34
+ Compare-at unit price shown as the original price.
35
+ </ParamField>
36
+
37
+ <ParamField body="metadata" type="object">
38
+ Custom key-value data stored on the line item; `offer_id` is merged in automatically.
39
+ </ParamField>
40
+
41
+ <ParamField body="additional_data" type="object">
42
+ Data passed to the add-to-cart workflow's hooks.
43
+ </ParamField>
44
+
45
+ ## Response
46
+
47
+ <ResponseField name="cart" type="object">
48
+ <Expandable title="properties">
49
+ <ResponseField name="id" type="string">The cart's ID.</ResponseField>
50
+ <ResponseField name="currency_code" type="string">The cart's currency.</ResponseField>
51
+ <ResponseField name="region_id" type="string">The cart's region.</ResponseField>
52
+ <ResponseField name="email" type="string | null">The customer's email.</ResponseField>
53
+ <ResponseField name="items" type="object[]">Line items, each carrying `offer_id` in its `metadata`.</ResponseField>
54
+ <ResponseField name="shipping_methods" type="object[]">Selected shipping methods.</ResponseField>
55
+ <ResponseField name="promotions" type="object[]">Applied promotions.</ResponseField>
56
+ <ResponseField name="shipping_address" type="object | null">The shipping address.</ResponseField>
57
+ <ResponseField name="billing_address" type="object | null">The billing address.</ResponseField>
58
+ <ResponseField name="payment_collection" type="object | null">The cart's payment collection with its sessions.</ResponseField>
59
+ <ResponseField name="total" type="number">Cart total including tax and shipping.</ResponseField>
60
+ <ResponseField name="subtotal" type="number">Cart subtotal.</ResponseField>
61
+ <ResponseField name="tax_total" type="number">Total tax amount.</ResponseField>
62
+ <ResponseField name="discount_total" type="number">Total discount amount.</ResponseField>
63
+ <ResponseField name="shipping_total" type="number">Total shipping amount.</ResponseField>
64
+ </Expandable>
65
+ </ResponseField>
66
+
67
+ <RequestExample>
68
+ ```bash cURL
69
+ curl -X POST 'http://localhost:9000/store/carts/cart_01JB2KB1CD/line-items' \
70
+ -H 'Content-Type: application/json' \
71
+ -H 'x-publishable-api-key: pk_01JB2K3XYZ' \
72
+ -d '{"offer_id": "offer_01JB2K6G5H", "quantity": 1}'
73
+ ```
74
+
75
+ ```ts JS Client
76
+ const { cart } = await client.store.carts.$id.lineItems.mutate({
77
+ $id: "cart_01JB2KB1CD",
78
+ offer_id: "offer_01JB2K6G5H",
79
+ quantity: 1,
80
+ })
81
+ ```
82
+ </RequestExample>
83
+
84
+ <ResponseExample>
85
+ ```json 200
86
+ {
87
+ "cart": {
88
+ "id": "cart_01JB2KB1CD",
89
+ "currency_code": "eur",
90
+ "region_id": "reg_01JB2K4S1T",
91
+ "email": null,
92
+ "items": [
93
+ {
94
+ "id": "cali_01JB2KB3EF",
95
+ "title": "M",
96
+ "product_title": "Linen Shirt",
97
+ "quantity": 1,
98
+ "unit_price": 4500,
99
+ "metadata": { "offer_id": "offer_01JB2K6G5H" }
100
+ }
101
+ ],
102
+ "shipping_methods": [],
103
+ "promotions": [],
104
+ "shipping_address": null,
105
+ "billing_address": null,
106
+ "payment_collection": null,
107
+ "total": 4500,
108
+ "subtotal": 4500,
109
+ "tax_total": 0,
110
+ "discount_total": 0,
111
+ "shipping_total": 0
112
+ }
113
+ }
114
+ ```
115
+ </ResponseExample>
@@ -0,0 +1,84 @@
1
+ ---
2
+ title: "Add Shipping Method"
3
+ api: "POST /store/carts/{id}/shipping-methods"
4
+ description: "Add a seller shipping option to the cart."
5
+ ---
6
+
7
+ Adds the chosen shipping option to the cart through Mercur's seller-aware workflow, so each seller's items can carry their own shipping method.
8
+
9
+ ## Path parameters
10
+
11
+ <ParamField path="id" type="string" required>
12
+ The cart's ID.
13
+ </ParamField>
14
+
15
+ ## Query parameters
16
+
17
+ <ParamField query="fields" type="string">
18
+ Comma-separated fields and relations to include on the returned cart; prefix with `+`/`-` to add to or remove from the defaults.
19
+ </ParamField>
20
+
21
+ ## Body parameters
22
+
23
+ <ParamField body="option_id" type="string" required>
24
+ ID of the shipping option to add.
25
+ </ParamField>
26
+
27
+ <ParamField body="data" type="object">
28
+ Provider-specific data forwarded to the fulfillment provider.
29
+ </ParamField>
30
+
31
+ <ParamField body="additional_data" type="object">
32
+ Data passed to the workflow's hooks.
33
+ </ParamField>
34
+
35
+ ## Response
36
+
37
+ <ResponseField name="cart" type="object">
38
+ <Expandable title="properties">
39
+ <ResponseField name="id" type="string">The cart's ID.</ResponseField>
40
+ <ResponseField name="currency_code" type="string">The cart's currency.</ResponseField>
41
+ <ResponseField name="items" type="object[]">Line items in the cart.</ResponseField>
42
+ <ResponseField name="shipping_methods" type="object[]">Shipping methods with `shipping_option_id`, `amount`, and tax lines.</ResponseField>
43
+ <ResponseField name="shipping_total" type="number">Total shipping amount.</ResponseField>
44
+ <ResponseField name="total" type="number">Cart total including tax and shipping.</ResponseField>
45
+ </Expandable>
46
+ </ResponseField>
47
+
48
+ <RequestExample>
49
+ ```bash cURL
50
+ curl -X POST 'http://localhost:9000/store/carts/cart_01JB2KB1CD/shipping-methods' \
51
+ -H 'Content-Type: application/json' \
52
+ -H 'x-publishable-api-key: pk_01JB2K3XYZ' \
53
+ -d '{"option_id": "so_01JB2KC4GH"}'
54
+ ```
55
+
56
+ ```ts JS Client
57
+ const { cart } = await client.store.carts.$id.shippingMethods.mutate({
58
+ $id: "cart_01JB2KB1CD",
59
+ option_id: "so_01JB2KC4GH",
60
+ })
61
+ ```
62
+ </RequestExample>
63
+
64
+ <ResponseExample>
65
+ ```json 200
66
+ {
67
+ "cart": {
68
+ "id": "cart_01JB2KB1CD",
69
+ "currency_code": "eur",
70
+ "items": [{ "id": "cali_01JB2KB3EF", "quantity": 1, "unit_price": 4500 }],
71
+ "shipping_methods": [
72
+ {
73
+ "shipping_option_id": "so_01JB2KC4GH",
74
+ "amount": 900,
75
+ "is_tax_inclusive": false,
76
+ "tax_lines": []
77
+ }
78
+ ],
79
+ "shipping_total": 900,
80
+ "total": 5400
81
+ }
82
+ }
83
+ ```
84
+ </ResponseExample>
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: "Apply Promotions"
3
+ api: "POST /store/carts/{id}/promotions"
4
+ description: "Apply promotion codes to the cart."
5
+ ---
6
+
7
+ Applies promotion codes through Mercur's seller-aware workflow so seller-scoped promotions only adjust that seller's items; sending an empty array replaces (clears) the applied codes.
8
+
9
+ ## Path parameters
10
+
11
+ <ParamField path="id" type="string" required>
12
+ The cart's ID.
13
+ </ParamField>
14
+
15
+ ## Query parameters
16
+
17
+ <ParamField query="fields" type="string">
18
+ Comma-separated fields and relations to include on the returned cart; prefix with `+`/`-` to add to or remove from the defaults.
19
+ </ParamField>
20
+
21
+ ## Body parameters
22
+
23
+ <ParamField body="promo_codes" type="string[]" required>
24
+ Promotion codes to add; an empty array removes all applied codes.
25
+ </ParamField>
26
+
27
+ ## Response
28
+
29
+ <ResponseField name="cart" type="object">
30
+ <Expandable title="properties">
31
+ <ResponseField name="id" type="string">The cart's ID.</ResponseField>
32
+ <ResponseField name="promotions" type="object[]">Applied promotions with `code` and `application_method`.</ResponseField>
33
+ <ResponseField name="items" type="object[]">Line items with their promotion `adjustments`.</ResponseField>
34
+ <ResponseField name="discount_total" type="number">Total discount amount.</ResponseField>
35
+ <ResponseField name="total" type="number">Cart total after discounts.</ResponseField>
36
+ </Expandable>
37
+ </ResponseField>
38
+
39
+ <RequestExample>
40
+ ```bash cURL
41
+ curl -X POST 'http://localhost:9000/store/carts/cart_01JB2KB1CD/promotions' \
42
+ -H 'Content-Type: application/json' \
43
+ -H 'x-publishable-api-key: pk_01JB2K3XYZ' \
44
+ -d '{"promo_codes": ["SUMMER10"]}'
45
+ ```
46
+
47
+ ```ts JS Client
48
+ const { cart } = await client.store.carts.$id.promotions.mutate({
49
+ $id: "cart_01JB2KB1CD",
50
+ promo_codes: ["SUMMER10"],
51
+ })
52
+ ```
53
+ </RequestExample>
54
+
55
+ <ResponseExample>
56
+ ```json 200
57
+ {
58
+ "cart": {
59
+ "id": "cart_01JB2KB1CD",
60
+ "promotions": [
61
+ {
62
+ "id": "promo_01JB2KD5JK",
63
+ "code": "SUMMER10",
64
+ "is_automatic": false,
65
+ "application_method": { "type": "percentage", "value": 10, "currency_code": "eur" }
66
+ }
67
+ ],
68
+ "items": [
69
+ {
70
+ "id": "cali_01JB2KB3EF",
71
+ "quantity": 1,
72
+ "unit_price": 4500,
73
+ "adjustments": [
74
+ { "id": "caadj_01JB2KD6LM", "code": "SUMMER10", "promotion_id": "promo_01JB2KD5JK", "amount": 450 }
75
+ ]
76
+ }
77
+ ],
78
+ "discount_total": 450,
79
+ "total": 4950
80
+ }
81
+ }
82
+ ```
83
+ </ResponseExample>