@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,78 @@
1
+ ---
2
+ title: "Create Product Variant"
3
+ api: "POST /admin/products/{id}/variants"
4
+ description: "Add a variant to a product."
5
+ ---
6
+
7
+ Creates a new variant on the product and returns the updated product.
8
+
9
+ ## Path parameters
10
+
11
+ <ParamField path="id" type="string" required>The product's ID.</ParamField>
12
+
13
+ ## Body parameters
14
+
15
+ <ParamField body="title" type="string" required>Variant title.</ParamField>
16
+ <ParamField body="sku" type="string">Variant SKU.</ParamField>
17
+ <ParamField body="ean" type="string">Variant EAN.</ParamField>
18
+ <ParamField body="upc" type="string">Variant UPC.</ParamField>
19
+ <ParamField body="isbn" type="string">Variant ISBN.</ParamField>
20
+ <ParamField body="asin" type="string">Variant ASIN.</ParamField>
21
+ <ParamField body="gtin" type="string">Variant GTIN.</ParamField>
22
+ <ParamField body="barcode" type="string">Variant barcode.</ParamField>
23
+ <ParamField body="hs_code" type="string">Harmonized System code.</ParamField>
24
+ <ParamField body="mid_code" type="string">Manufacturer identification code.</ParamField>
25
+ <ParamField body="variant_rank" type="number">Sort rank of the variant.</ParamField>
26
+ <ParamField body="weight" type="number">Variant weight.</ParamField>
27
+ <ParamField body="length" type="number">Variant length.</ParamField>
28
+ <ParamField body="height" type="number">Variant height.</ParamField>
29
+ <ParamField body="width" type="number">Variant width.</ParamField>
30
+ <ParamField body="origin_country" type="string">Country of origin.</ParamField>
31
+ <ParamField body="material" type="string">Variant material.</ParamField>
32
+ <ParamField body="options" type="object">Map of option title to option value, for example `{"Size": "L"}`.</ParamField>
33
+ <ParamField body="metadata" type="object">Custom key-value data.</ParamField>
34
+ <ParamField body="additional_data" type="object">Custom data passed to workflow hooks.</ParamField>
35
+
36
+ ## Response
37
+
38
+ <ResponseField name="product" type="object">
39
+ <Expandable title="properties">
40
+ <ResponseField name="id" type="string">The product's ID.</ResponseField>
41
+ <ResponseField name="title" type="string">Product title.</ResponseField>
42
+ <ResponseField name="variants" type="object[]">All variants, including the created one.</ResponseField>
43
+ <ResponseField name="updated_at" type="string">Last update timestamp.</ResponseField>
44
+ </Expandable>
45
+ </ResponseField>
46
+
47
+ <RequestExample>
48
+ ```bash cURL
49
+ curl -X POST 'http://localhost:9000/admin/products/prod_01HXYZABCDEF/variants' \
50
+ -H 'Authorization: Bearer <token>' \
51
+ -H 'Content-Type: application/json' \
52
+ -d '{"title": "L", "sku": "LS-L", "options": {"Size": "L"}}'
53
+ ```
54
+
55
+ ```ts JS Client
56
+ const { product } = await client.admin.products.$id.variants.mutate({
57
+ $id: "prod_01HXYZABCDEF",
58
+ title: "L",
59
+ sku: "LS-L",
60
+ options: { Size: "L" },
61
+ })
62
+ ```
63
+ </RequestExample>
64
+
65
+ <ResponseExample>
66
+ ```json 200
67
+ {
68
+ "product": {
69
+ "id": "prod_01HXYZABCDEF",
70
+ "title": "Linen Shirt",
71
+ "variants": [
72
+ { "id": "variant_01HXYZABCDEF", "title": "M", "sku": "LS-M" },
73
+ { "id": "variant_01HXYZABCDEG", "title": "L", "sku": "LS-L" }
74
+ ]
75
+ }
76
+ }
77
+ ```
78
+ </ResponseExample>
@@ -0,0 +1,169 @@
1
+ ---
2
+ title: "Create Product"
3
+ api: "POST /admin/products"
4
+ description: "Create a master catalog product."
5
+ ---
6
+
7
+ Creates a shared master product that sellers can be made eligible to sell.
8
+
9
+ <Note>
10
+ Pass `seller_ids` to set which sellers may sell the product. The `attributes` array accepts a unified input: reference an existing catalog attribute by `id`, or create an inline product-scoped attribute by `title`.
11
+ </Note>
12
+
13
+ ## Body parameters
14
+
15
+ <ParamField body="title" type="string" required>Product title.</ParamField>
16
+ <ParamField body="subtitle" type="string">Product subtitle.</ParamField>
17
+ <ParamField body="description" type="string">Product description.</ParamField>
18
+ <ParamField body="handle" type="string">Unique URL-safe handle, generated from the title if omitted.</ParamField>
19
+ <ParamField body="status" type="string">One of `draft`, `proposed`, `published`, `rejected`.</ParamField>
20
+ <ParamField body="is_giftcard" type="boolean" default="false">Whether the product is a gift card.</ParamField>
21
+ <ParamField body="discountable" type="boolean" default="true">Whether discounts can apply to the product.</ParamField>
22
+ <ParamField body="thumbnail" type="string">URL of the product thumbnail.</ParamField>
23
+ <ParamField body="images" type="object[]">
24
+ Product images.
25
+ <Expandable title="properties">
26
+ <ParamField body="url" type="string" required>Image URL.</ParamField>
27
+ </Expandable>
28
+ </ParamField>
29
+ <ParamField body="external_id" type="string">ID of the product in an external system.</ParamField>
30
+ <ParamField body="type_id" type="string">ID of the product type.</ParamField>
31
+ <ParamField body="collection_id" type="string">ID of the collection to assign the product to.</ParamField>
32
+ <ParamField body="seller_ids" type="string[]">IDs of sellers eligible to sell the product.</ParamField>
33
+ <ParamField body="categories" type="object[]">
34
+ Categories to assign the product to.
35
+ <Expandable title="properties">
36
+ <ParamField body="id" type="string" required>Category ID.</ParamField>
37
+ </Expandable>
38
+ </ParamField>
39
+ <ParamField body="tags" type="object[]">
40
+ Tags to assign to the product.
41
+ <Expandable title="properties">
42
+ <ParamField body="id" type="string" required>Tag ID.</ParamField>
43
+ </Expandable>
44
+ </ParamField>
45
+ <ParamField body="options" type="object[]">
46
+ Product options used to build variants.
47
+ <Expandable title="properties">
48
+ <ParamField body="title" type="string" required>Option title, for example `Size`.</ParamField>
49
+ <ParamField body="values" type="string[]" required>Possible option values.</ParamField>
50
+ </Expandable>
51
+ </ParamField>
52
+ <ParamField body="attributes" type="object[]">
53
+ Unified attribute input — one of two shapes per item.
54
+ <Expandable title="existing attribute (by id)">
55
+ <ParamField body="id" type="string" required>ID of an existing catalog attribute.</ParamField>
56
+ <ParamField body="value_ids" type="string[]">IDs of attribute values to select.</ParamField>
57
+ <ParamField body="value" type="string | number | boolean">Scalar value for `text`, `unit`, or `toggle` attributes.</ParamField>
58
+ </Expandable>
59
+ <Expandable title="inline attribute (by title)">
60
+ <ParamField body="title" type="string" required>Attribute title.</ParamField>
61
+ <ParamField body="type" type="string">One of `single_select`, `multi_select`, `unit`, `toggle`, `text`.</ParamField>
62
+ <ParamField body="values" type="string[]">Value names to create and select.</ParamField>
63
+ <ParamField body="value" type="string | number | boolean">Scalar value for non-select types.</ParamField>
64
+ <ParamField body="is_variant_axis" type="boolean">Whether the attribute drives variant generation; only valid for `multi_select`.</ParamField>
65
+ <ParamField body="is_filterable" type="boolean">Whether the attribute can be used as a storefront filter.</ParamField>
66
+ <ParamField body="is_required" type="boolean">Whether a value is required on products.</ParamField>
67
+ <ParamField body="description" type="string">Attribute description.</ParamField>
68
+ <ParamField body="metadata" type="object">Custom key-value data.</ParamField>
69
+ </Expandable>
70
+ </ParamField>
71
+ <ParamField body="variants" type="object[]">
72
+ Product variants.
73
+ <Expandable title="properties">
74
+ <ParamField body="title" type="string" required>Variant title.</ParamField>
75
+ <ParamField body="sku" type="string">Variant SKU.</ParamField>
76
+ <ParamField body="ean" type="string">Variant EAN.</ParamField>
77
+ <ParamField body="upc" type="string">Variant UPC.</ParamField>
78
+ <ParamField body="isbn" type="string">Variant ISBN.</ParamField>
79
+ <ParamField body="asin" type="string">Variant ASIN.</ParamField>
80
+ <ParamField body="gtin" type="string">Variant GTIN.</ParamField>
81
+ <ParamField body="barcode" type="string">Variant barcode.</ParamField>
82
+ <ParamField body="hs_code" type="string">Harmonized System code.</ParamField>
83
+ <ParamField body="mid_code" type="string">Manufacturer identification code.</ParamField>
84
+ <ParamField body="variant_rank" type="number">Sort rank of the variant.</ParamField>
85
+ <ParamField body="weight" type="number">Variant weight.</ParamField>
86
+ <ParamField body="length" type="number">Variant length.</ParamField>
87
+ <ParamField body="height" type="number">Variant height.</ParamField>
88
+ <ParamField body="width" type="number">Variant width.</ParamField>
89
+ <ParamField body="origin_country" type="string">Country of origin.</ParamField>
90
+ <ParamField body="material" type="string">Variant material.</ParamField>
91
+ <ParamField body="options" type="object">Map of option title to option value, for example `{"Size": "M"}`.</ParamField>
92
+ <ParamField body="metadata" type="object">Custom key-value data.</ParamField>
93
+ </Expandable>
94
+ </ParamField>
95
+ <ParamField body="weight" type="number">Product weight.</ParamField>
96
+ <ParamField body="length" type="number">Product length.</ParamField>
97
+ <ParamField body="height" type="number">Product height.</ParamField>
98
+ <ParamField body="width" type="number">Product width.</ParamField>
99
+ <ParamField body="hs_code" type="string">Harmonized System code.</ParamField>
100
+ <ParamField body="mid_code" type="string">Manufacturer identification code.</ParamField>
101
+ <ParamField body="origin_country" type="string">Country of origin.</ParamField>
102
+ <ParamField body="material" type="string">Product material.</ParamField>
103
+ <ParamField body="metadata" type="object">Custom key-value data.</ParamField>
104
+ <ParamField body="additional_data" type="object">Custom data passed to workflow hooks.</ParamField>
105
+
106
+ ## Response
107
+
108
+ <ResponseField name="product" type="object">
109
+ <Expandable title="properties">
110
+ <ResponseField name="id" type="string">The product's ID.</ResponseField>
111
+ <ResponseField name="title" type="string">Product title.</ResponseField>
112
+ <ResponseField name="handle" type="string">Unique URL-safe handle.</ResponseField>
113
+ <ResponseField name="status" type="string">One of `draft`, `proposed`, `published`, `rejected`.</ResponseField>
114
+ <ResponseField name="variants" type="object[]">Created variants.</ResponseField>
115
+ <ResponseField name="product_attribute_values" type="object[]">Attribute values selected on the product.</ResponseField>
116
+ <ResponseField name="scoped_attributes" type="object[]">Product-scoped (inline) attributes with their values.</ResponseField>
117
+ <ResponseField name="attributes" type="object[]">Computed attribute groups with selected `values` and `all_values`.</ResponseField>
118
+ <ResponseField name="created_at" type="string">Creation timestamp.</ResponseField>
119
+ <ResponseField name="updated_at" type="string">Last update timestamp.</ResponseField>
120
+ </Expandable>
121
+ </ResponseField>
122
+
123
+ <RequestExample>
124
+ ```bash cURL
125
+ curl -X POST 'http://localhost:9000/admin/products' \
126
+ -H 'Authorization: Bearer <token>' \
127
+ -H 'Content-Type: application/json' \
128
+ -d '{
129
+ "title": "Linen Shirt",
130
+ "seller_ids": ["sel_01HXYZABCDEF"],
131
+ "options": [{ "title": "Size", "values": ["S", "M"] }],
132
+ "variants": [
133
+ { "title": "S", "sku": "LS-S", "options": { "Size": "S" } },
134
+ { "title": "M", "sku": "LS-M", "options": { "Size": "M" } }
135
+ ],
136
+ "attributes": [{ "title": "Material", "type": "single_select", "values": ["Linen"] }]
137
+ }'
138
+ ```
139
+
140
+ ```ts JS Client
141
+ const { product } = await client.admin.products.mutate({
142
+ title: "Linen Shirt",
143
+ seller_ids: ["sel_01HXYZABCDEF"],
144
+ options: [{ title: "Size", values: ["S", "M"] }],
145
+ variants: [
146
+ { title: "S", sku: "LS-S", options: { Size: "S" } },
147
+ { title: "M", sku: "LS-M", options: { Size: "M" } },
148
+ ],
149
+ attributes: [{ title: "Material", type: "single_select", values: ["Linen"] }],
150
+ })
151
+ ```
152
+ </RequestExample>
153
+
154
+ <ResponseExample>
155
+ ```json 200
156
+ {
157
+ "product": {
158
+ "id": "prod_01HXYZABCDEF",
159
+ "title": "Linen Shirt",
160
+ "handle": "linen-shirt",
161
+ "status": "draft",
162
+ "variants": [
163
+ { "id": "variant_01HXYZABCDEF", "title": "S", "sku": "LS-S" },
164
+ { "id": "variant_01HXYZABCDEG", "title": "M", "sku": "LS-M" }
165
+ ]
166
+ }
167
+ }
168
+ ```
169
+ </ResponseExample>
@@ -0,0 +1,48 @@
1
+ ---
2
+ title: "Delete Product Variant"
3
+ api: "DELETE /admin/products/{id}/variants/{variant_id}"
4
+ description: "Delete a variant from a product."
5
+ ---
6
+
7
+ Deletes the variant and returns the parent product.
8
+
9
+ ## Path parameters
10
+
11
+ <ParamField path="id" type="string" required>The product's ID.</ParamField>
12
+ <ParamField path="variant_id" type="string" required>The variant's ID.</ParamField>
13
+
14
+ ## Response
15
+
16
+ <ResponseField name="id" type="string">The deleted variant's ID.</ResponseField>
17
+ <ResponseField name="object" type="string">Always `variant`.</ResponseField>
18
+ <ResponseField name="deleted" type="boolean">Always `true`.</ResponseField>
19
+ <ResponseField name="parent" type="object">The parent product after deletion.</ResponseField>
20
+
21
+ <RequestExample>
22
+ ```bash cURL
23
+ curl -X DELETE 'http://localhost:9000/admin/products/prod_01HXYZABCDEF/variants/variant_01HXYZABCDEF' \
24
+ -H 'Authorization: Bearer <token>'
25
+ ```
26
+
27
+ ```ts JS Client
28
+ const result = await client.admin.products.$id.variants.$variant_id.delete({
29
+ $id: "prod_01HXYZABCDEF",
30
+ $variant_id: "variant_01HXYZABCDEF",
31
+ })
32
+ ```
33
+ </RequestExample>
34
+
35
+ <ResponseExample>
36
+ ```json 200
37
+ {
38
+ "id": "variant_01HXYZABCDEF",
39
+ "object": "variant",
40
+ "deleted": true,
41
+ "parent": {
42
+ "id": "prod_01HXYZABCDEF",
43
+ "title": "Linen Shirt",
44
+ "variants": []
45
+ }
46
+ }
47
+ ```
48
+ </ResponseExample>
@@ -0,0 +1,40 @@
1
+ ---
2
+ title: "Delete Product"
3
+ api: "DELETE /admin/products/{id}"
4
+ description: "Delete a master catalog product."
5
+ ---
6
+
7
+ Soft-deletes the product and its variants.
8
+
9
+ ## Path parameters
10
+
11
+ <ParamField path="id" type="string" required>The product's ID.</ParamField>
12
+
13
+ ## Response
14
+
15
+ <ResponseField name="id" type="string">The deleted product's ID.</ResponseField>
16
+ <ResponseField name="object" type="string">Always `product`.</ResponseField>
17
+ <ResponseField name="deleted" type="boolean">Always `true`.</ResponseField>
18
+
19
+ <RequestExample>
20
+ ```bash cURL
21
+ curl -X DELETE 'http://localhost:9000/admin/products/prod_01HXYZABCDEF' \
22
+ -H 'Authorization: Bearer <token>'
23
+ ```
24
+
25
+ ```ts JS Client
26
+ const result = await client.admin.products.$id.delete({
27
+ $id: "prod_01HXYZABCDEF",
28
+ })
29
+ ```
30
+ </RequestExample>
31
+
32
+ <ResponseExample>
33
+ ```json 200
34
+ {
35
+ "id": "prod_01HXYZABCDEF",
36
+ "object": "product",
37
+ "deleted": true
38
+ }
39
+ ```
40
+ </ResponseExample>
@@ -0,0 +1,91 @@
1
+ ---
2
+ title: "List Product Variants"
3
+ api: "GET /admin/products/{id}/variants"
4
+ description: "Retrieve a paginated list of a product's variants."
5
+ ---
6
+
7
+ Returns the variants of a single product, with optional filtering by SKU and identifiers.
8
+
9
+ ## Path parameters
10
+
11
+ <ParamField path="id" type="string" required>The product's ID.</ParamField>
12
+
13
+ ## Query parameters
14
+
15
+ <ParamField query="limit" type="number" default="50">Maximum number of records to return.</ParamField>
16
+ <ParamField query="offset" type="number" default="0">Number of records to skip.</ParamField>
17
+ <ParamField query="order" type="string">Field to sort by, prefix with `-` for descending order.</ParamField>
18
+ <ParamField query="fields" type="string">Comma-separated list of fields to include, prefix with `+`/`-` to add or remove from defaults.</ParamField>
19
+ <ParamField query="q" type="string">Search term matched against variant fields.</ParamField>
20
+ <ParamField query="id" type="string | string[]">Filter by variant ID(s).</ParamField>
21
+ <ParamField query="sku" type="string">Filter by SKU.</ParamField>
22
+ <ParamField query="ean" type="string">Filter by EAN.</ParamField>
23
+ <ParamField query="upc" type="string">Filter by UPC.</ParamField>
24
+ <ParamField query="barcode" type="string">Filter by barcode.</ParamField>
25
+
26
+ ## Response
27
+
28
+ <ResponseField name="variants" type="object[]">
29
+ <Expandable title="properties">
30
+ <ResponseField name="id" type="string">The variant's ID.</ResponseField>
31
+ <ResponseField name="title" type="string">Variant title.</ResponseField>
32
+ <ResponseField name="sku" type="string">Variant SKU.</ResponseField>
33
+ <ResponseField name="ean" type="string">Variant EAN.</ResponseField>
34
+ <ResponseField name="upc" type="string">Variant UPC.</ResponseField>
35
+ <ResponseField name="barcode" type="string">Variant barcode.</ResponseField>
36
+ <ResponseField name="hs_code" type="string">Harmonized System code.</ResponseField>
37
+ <ResponseField name="mid_code" type="string">Manufacturer identification code.</ResponseField>
38
+ <ResponseField name="variant_rank" type="number">Sort rank of the variant.</ResponseField>
39
+ <ResponseField name="weight" type="number">Variant weight.</ResponseField>
40
+ <ResponseField name="length" type="number">Variant length.</ResponseField>
41
+ <ResponseField name="height" type="number">Variant height.</ResponseField>
42
+ <ResponseField name="width" type="number">Variant width.</ResponseField>
43
+ <ResponseField name="origin_country" type="string">Country of origin.</ResponseField>
44
+ <ResponseField name="material" type="string">Variant material.</ResponseField>
45
+ <ResponseField name="product_id" type="string">ID of the parent product.</ResponseField>
46
+ <ResponseField name="manage_inventory" type="boolean">Whether inventory is tracked for the variant.</ResponseField>
47
+ <ResponseField name="allow_backorder" type="boolean">Whether the variant can be ordered when out of stock.</ResponseField>
48
+ <ResponseField name="options" type="object[]">The variant's option values.</ResponseField>
49
+ <ResponseField name="metadata" type="object">Custom key-value data.</ResponseField>
50
+ <ResponseField name="created_at" type="string">Creation timestamp.</ResponseField>
51
+ <ResponseField name="updated_at" type="string">Last update timestamp.</ResponseField>
52
+ </Expandable>
53
+ </ResponseField>
54
+ <ResponseField name="count" type="number">Total number of matching variants.</ResponseField>
55
+ <ResponseField name="offset" type="number">Number of records skipped.</ResponseField>
56
+ <ResponseField name="limit" type="number">Number of records returned.</ResponseField>
57
+
58
+ <RequestExample>
59
+ ```bash cURL
60
+ curl 'http://localhost:9000/admin/products/prod_01HXYZABCDEF/variants?limit=20' \
61
+ -H 'Authorization: Bearer <token>'
62
+ ```
63
+
64
+ ```ts JS Client
65
+ const { variants, count } = await client.admin.products.$id.variants.query({
66
+ $id: "prod_01HXYZABCDEF",
67
+ limit: 20,
68
+ })
69
+ ```
70
+ </RequestExample>
71
+
72
+ <ResponseExample>
73
+ ```json 200
74
+ {
75
+ "variants": [
76
+ {
77
+ "id": "variant_01HXYZABCDEF",
78
+ "title": "M",
79
+ "sku": "LS-M",
80
+ "product_id": "prod_01HXYZABCDEF",
81
+ "manage_inventory": false,
82
+ "allow_backorder": false,
83
+ "variant_rank": 0
84
+ }
85
+ ],
86
+ "count": 1,
87
+ "offset": 0,
88
+ "limit": 20
89
+ }
90
+ ```
91
+ </ResponseExample>
@@ -0,0 +1,109 @@
1
+ ---
2
+ title: "List Products"
3
+ api: "GET /admin/products"
4
+ description: "Retrieve a paginated list of master catalog products."
5
+ ---
6
+
7
+ Returns all products across the marketplace, with optional filtering by status, seller, category, and more.
8
+
9
+ ## Query parameters
10
+
11
+ <ParamField query="limit" type="number" default="50">Maximum number of records to return.</ParamField>
12
+ <ParamField query="offset" type="number" default="0">Number of records to skip.</ParamField>
13
+ <ParamField query="order" type="string">Field to sort by, prefix with `-` for descending order.</ParamField>
14
+ <ParamField query="fields" type="string">Comma-separated list of fields to include, prefix with `+`/`-` to add or remove from defaults.</ParamField>
15
+ <ParamField query="q" type="string">Search term matched against product fields.</ParamField>
16
+ <ParamField query="id" type="string | string[]">Filter by product ID(s).</ParamField>
17
+ <ParamField query="title" type="string">Filter by product title.</ParamField>
18
+ <ParamField query="handle" type="string">Filter by product handle.</ParamField>
19
+ <ParamField query="seller_id" type="string | string[]">Filter by the seller(s) eligible to sell the product.</ParamField>
20
+ <ParamField query="status" type="string[]">Filter by status: `draft`, `proposed`, `published`, or `rejected`.</ParamField>
21
+ <ParamField query="collection_id" type="string | string[]">Filter by collection ID(s).</ParamField>
22
+ <ParamField query="type_id" type="string | string[]">Filter by product type ID(s).</ParamField>
23
+ <ParamField query="category_id" type="string | string[]">Filter by category ID(s).</ParamField>
24
+ <ParamField query="tag_id" type="string | string[]">Filter by tag ID(s).</ParamField>
25
+ <ParamField query="sku" type="string">Filter by variant SKU.</ParamField>
26
+ <ParamField query="ean" type="string">Filter by variant EAN.</ParamField>
27
+ <ParamField query="upc" type="string">Filter by variant UPC.</ParamField>
28
+ <ParamField query="barcode" type="string">Filter by variant barcode.</ParamField>
29
+ <ParamField query="has_offer" type="boolean">Filter to products that have (or don't have) seller offers.</ParamField>
30
+ <ParamField query="created_at" type="object">Filter by creation date with operators like `$gte`, `$lte`.</ParamField>
31
+ <ParamField query="updated_at" type="object">Filter by update date with operators like `$gte`, `$lte`.</ParamField>
32
+ <ParamField query="deleted_at" type="object">Filter by deletion date with operators like `$gte`, `$lte`.</ParamField>
33
+
34
+ ## Response
35
+
36
+ <ResponseField name="products" type="object[]">
37
+ <Expandable title="properties">
38
+ <ResponseField name="id" type="string">The product's ID.</ResponseField>
39
+ <ResponseField name="title" type="string">Product title.</ResponseField>
40
+ <ResponseField name="subtitle" type="string">Product subtitle.</ResponseField>
41
+ <ResponseField name="status" type="string">One of `draft`, `proposed`, `published`, `rejected`.</ResponseField>
42
+ <ResponseField name="description" type="string">Product description.</ResponseField>
43
+ <ResponseField name="handle" type="string">Unique URL-safe handle.</ResponseField>
44
+ <ResponseField name="is_giftcard" type="boolean">Whether the product is a gift card.</ResponseField>
45
+ <ResponseField name="discountable" type="boolean">Whether discounts can apply to the product.</ResponseField>
46
+ <ResponseField name="thumbnail" type="string">URL of the product thumbnail.</ResponseField>
47
+ <ResponseField name="external_id" type="string">ID of the product in an external system.</ResponseField>
48
+ <ResponseField name="collection_id" type="string">ID of the product's collection.</ResponseField>
49
+ <ResponseField name="type_id" type="string">ID of the product's type.</ResponseField>
50
+ <ResponseField name="collection" type="object">The collection with `id`, `title`, and `handle`.</ResponseField>
51
+ <ResponseField name="categories" type="object[]">Categories with `id`, `name`, and `handle`.</ResponseField>
52
+ <ResponseField name="variants" type="object[]">Variants with `id`, `title`, `sku`, `manage_inventory`, `allow_backorder`, and `variant_rank`.</ResponseField>
53
+ <ResponseField name="product_attribute_values" type="object[]">Attribute values selected on the product, each with its parent `attribute`.</ResponseField>
54
+ <ResponseField name="scoped_attributes" type="object[]">Product-scoped (inline) attributes with their `values`.</ResponseField>
55
+ <ResponseField name="attributes" type="object[]">Computed attribute groups, each with the selected `values` and the attribute's full `all_values`.</ResponseField>
56
+ <ResponseField name="weight" type="number">Product weight.</ResponseField>
57
+ <ResponseField name="length" type="number">Product length.</ResponseField>
58
+ <ResponseField name="height" type="number">Product height.</ResponseField>
59
+ <ResponseField name="width" type="number">Product width.</ResponseField>
60
+ <ResponseField name="hs_code" type="string">Harmonized System code.</ResponseField>
61
+ <ResponseField name="mid_code" type="string">Manufacturer identification code.</ResponseField>
62
+ <ResponseField name="origin_country" type="string">Country of origin.</ResponseField>
63
+ <ResponseField name="material" type="string">Product material.</ResponseField>
64
+ <ResponseField name="metadata" type="object">Custom key-value data.</ResponseField>
65
+ <ResponseField name="created_at" type="string">Creation timestamp.</ResponseField>
66
+ <ResponseField name="updated_at" type="string">Last update timestamp.</ResponseField>
67
+ </Expandable>
68
+ </ResponseField>
69
+ <ResponseField name="count" type="number">Total number of matching products.</ResponseField>
70
+ <ResponseField name="offset" type="number">Number of records skipped.</ResponseField>
71
+ <ResponseField name="limit" type="number">Number of records returned.</ResponseField>
72
+
73
+ <RequestExample>
74
+ ```bash cURL
75
+ curl 'http://localhost:9000/admin/products?status[]=published&limit=20' \
76
+ -H 'Authorization: Bearer <token>'
77
+ ```
78
+
79
+ ```ts JS Client
80
+ const { products, count } = await client.admin.products.query({
81
+ status: ["published"],
82
+ limit: 20,
83
+ })
84
+ ```
85
+ </RequestExample>
86
+
87
+ <ResponseExample>
88
+ ```json 200
89
+ {
90
+ "products": [
91
+ {
92
+ "id": "prod_01HXYZABCDEF",
93
+ "title": "Linen Shirt",
94
+ "handle": "linen-shirt",
95
+ "status": "published",
96
+ "thumbnail": "https://cdn.example.com/linen-shirt.png",
97
+ "variants": [
98
+ { "id": "variant_01HXYZABCDEF", "title": "M", "sku": "LS-M", "variant_rank": 0 }
99
+ ],
100
+ "created_at": "2026-06-01T10:00:00.000Z",
101
+ "updated_at": "2026-06-01T10:00:00.000Z"
102
+ }
103
+ ],
104
+ "count": 1,
105
+ "offset": 0,
106
+ "limit": 20
107
+ }
108
+ ```
109
+ </ResponseExample>
@@ -0,0 +1,78 @@
1
+ ---
2
+ title: "Preview Product Changes"
3
+ api: "GET /admin/products/{id}/preview"
4
+ description: "Retrieve the pending change set for a product."
5
+ ---
6
+
7
+ Returns the product's pending change request with its individual change actions, or `null` if no change is pending.
8
+
9
+ <Note>
10
+ The response contains the pending `product_change` record and its `actions` — the raw edits awaiting review — not a merged product payload.
11
+ </Note>
12
+
13
+ ## Path parameters
14
+
15
+ <ParamField path="id" type="string" required>The product's ID.</ParamField>
16
+
17
+ ## Response
18
+
19
+ <ResponseField name="product_change" type="object | null">
20
+ <Expandable title="properties">
21
+ <ResponseField name="id" type="string">The product change's ID.</ResponseField>
22
+ <ResponseField name="product_id" type="string">ID of the product the change applies to.</ResponseField>
23
+ <ResponseField name="status" type="string">Always `pending` for this endpoint.</ResponseField>
24
+ <ResponseField name="internal_note" type="string">Note visible to operators only.</ResponseField>
25
+ <ResponseField name="external_note" type="string">Note visible to the vendor.</ResponseField>
26
+ <ResponseField name="created_by" type="string">ID of the actor who created the change.</ResponseField>
27
+ <ResponseField name="actions" type="object[]">
28
+ Individual change actions, in order.
29
+ <Expandable title="properties">
30
+ <ResponseField name="id" type="string">The action's ID.</ResponseField>
31
+ <ResponseField name="action" type="string">The action type.</ResponseField>
32
+ <ResponseField name="ordering" type="number">Application order of the action.</ResponseField>
33
+ <ResponseField name="details" type="object">The proposed field changes.</ResponseField>
34
+ <ResponseField name="applied" type="boolean">Whether the action has been applied.</ResponseField>
35
+ </Expandable>
36
+ </ResponseField>
37
+ <ResponseField name="created_at" type="string">Creation timestamp.</ResponseField>
38
+ <ResponseField name="updated_at" type="string">Last update timestamp.</ResponseField>
39
+ </Expandable>
40
+ </ResponseField>
41
+
42
+ <RequestExample>
43
+ ```bash cURL
44
+ curl 'http://localhost:9000/admin/products/prod_01HXYZABCDEF/preview' \
45
+ -H 'Authorization: Bearer <token>'
46
+ ```
47
+
48
+ ```ts JS Client
49
+ const { product_change } = await client.admin.products.$id.preview.query({
50
+ $id: "prod_01HXYZABCDEF",
51
+ })
52
+ ```
53
+ </RequestExample>
54
+
55
+ <ResponseExample>
56
+ ```json 200
57
+ {
58
+ "product_change": {
59
+ "id": "prodch_01HXYZABCDEF",
60
+ "product_id": "prod_01HXYZABCDEF",
61
+ "status": "pending",
62
+ "internal_note": null,
63
+ "external_note": null,
64
+ "actions": [
65
+ {
66
+ "id": "prodchact_01HXYZABCDEF",
67
+ "action": "update_product",
68
+ "ordering": 0,
69
+ "details": { "title": "Linen Shirt v2" },
70
+ "applied": false
71
+ }
72
+ ],
73
+ "created_at": "2026-06-01T10:00:00.000Z",
74
+ "updated_at": "2026-06-01T10:00:00.000Z"
75
+ }
76
+ }
77
+ ```
78
+ </ResponseExample>