@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.
- package/README.md +24 -0
- package/content/blocks.mdx +209 -0
- package/content/learn/architecture.mdx +215 -0
- package/content/learn/attributes.mdx +89 -0
- package/content/learn/blocks.mdx +99 -0
- package/content/learn/commissions.mdx +175 -0
- package/content/learn/concepts.mdx +84 -0
- package/content/learn/installation.mdx +117 -0
- package/content/learn/introduction.mdx +71 -0
- package/content/learn/offers.mdx +78 -0
- package/content/learn/order-groups.mdx +114 -0
- package/content/learn/payouts.mdx +175 -0
- package/content/learn/product-requests.mdx +82 -0
- package/content/learn/products.mdx +79 -0
- package/content/learn/registry.mdx +155 -0
- package/content/learn/seller-members.mdx +62 -0
- package/content/learn/sellers.mdx +118 -0
- package/content/migration/from-1-x-to-2-0.mdx +152 -0
- package/content/migration/from-2-0-to-2-1.mdx +105 -0
- package/content/migration/overview.mdx +58 -0
- package/content/references/api/admin/commission-rates/batch-commission-rules.mdx +70 -0
- package/content/references/api/admin/commission-rates/create-commission-rate.mdx +95 -0
- package/content/references/api/admin/commission-rates/delete-commission-rate.mdx +40 -0
- package/content/references/api/admin/commission-rates/list-commission-rates.mdx +92 -0
- package/content/references/api/admin/commission-rates/retrieve-commission-rate.mdx +70 -0
- package/content/references/api/admin/commission-rates/update-commission-rate.mdx +84 -0
- package/content/references/api/admin/members/list-members.mdx +61 -0
- package/content/references/api/admin/offers/batch-create-offers.mdx +130 -0
- package/content/references/api/admin/offers/delete-offer.mdx +40 -0
- package/content/references/api/admin/offers/list-offers.mdx +106 -0
- package/content/references/api/admin/offers/retrieve-offer.mdx +82 -0
- package/content/references/api/admin/order-groups/list-order-groups.mdx +77 -0
- package/content/references/api/admin/order-groups/retrieve-order-group.mdx +56 -0
- package/content/references/api/admin/orders/get-order-commission-lines.mdx +65 -0
- package/content/references/api/admin/orders/get-order-order-group.mdx +56 -0
- package/content/references/api/admin/orders/list-orders.mdx +79 -0
- package/content/references/api/admin/payouts/list-payouts.mdx +75 -0
- package/content/references/api/admin/payouts/retrieve-payout.mdx +62 -0
- package/content/references/api/admin/product-attributes/create-attribute-value.mdx +76 -0
- package/content/references/api/admin/product-attributes/create-product-attribute.mdx +99 -0
- package/content/references/api/admin/product-attributes/delete-attribute-value.mdx +52 -0
- package/content/references/api/admin/product-attributes/delete-product-attribute.mdx +40 -0
- package/content/references/api/admin/product-attributes/list-product-attributes.mdx +91 -0
- package/content/references/api/admin/product-attributes/retrieve-product-attribute.mdx +81 -0
- package/content/references/api/admin/product-attributes/update-attribute-value.mdx +66 -0
- package/content/references/api/admin/product-attributes/update-product-attribute.mdx +76 -0
- package/content/references/api/admin/product-changes/cancel-product-change.mdx +68 -0
- package/content/references/api/admin/product-changes/confirm-product-change.mdx +47 -0
- package/content/references/api/admin/products/batch-product-attributes.mdx +96 -0
- package/content/references/api/admin/products/confirm-product.mdx +59 -0
- package/content/references/api/admin/products/create-product-variant.mdx +78 -0
- package/content/references/api/admin/products/create-product.mdx +169 -0
- package/content/references/api/admin/products/delete-product-variant.mdx +48 -0
- package/content/references/api/admin/products/delete-product.mdx +40 -0
- package/content/references/api/admin/products/list-product-variants.mdx +91 -0
- package/content/references/api/admin/products/list-products.mdx +109 -0
- package/content/references/api/admin/products/preview-product.mdx +78 -0
- package/content/references/api/admin/products/reject-product.mdx +59 -0
- package/content/references/api/admin/products/request-product-changes.mdx +59 -0
- package/content/references/api/admin/products/retrieve-product-variant.mdx +73 -0
- package/content/references/api/admin/products/retrieve-product.mdx +96 -0
- package/content/references/api/admin/products/set-product-sellers.mdx +47 -0
- package/content/references/api/admin/products/update-product-variant.mdx +89 -0
- package/content/references/api/admin/products/update-product.mdx +133 -0
- package/content/references/api/admin/sellers/add-seller-member.mdx +63 -0
- package/content/references/api/admin/sellers/approve-seller.mdx +54 -0
- package/content/references/api/admin/sellers/create-seller.mdx +100 -0
- package/content/references/api/admin/sellers/delete-member-invite.mdx +42 -0
- package/content/references/api/admin/sellers/delete-professional-details.mdx +52 -0
- package/content/references/api/admin/sellers/invite-seller-member.mdx +63 -0
- package/content/references/api/admin/sellers/list-member-invites.mdx +71 -0
- package/content/references/api/admin/sellers/list-seller-members.mdx +71 -0
- package/content/references/api/admin/sellers/list-seller-products.mdx +85 -0
- package/content/references/api/admin/sellers/list-sellers.mdx +96 -0
- package/content/references/api/admin/sellers/remove-seller-member.mdx +42 -0
- package/content/references/api/admin/sellers/resend-member-invite.mdx +55 -0
- package/content/references/api/admin/sellers/retrieve-seller.mdx +81 -0
- package/content/references/api/admin/sellers/suspend-seller.mdx +60 -0
- package/content/references/api/admin/sellers/terminate-seller.mdx +60 -0
- package/content/references/api/admin/sellers/unsuspend-seller.mdx +52 -0
- package/content/references/api/admin/sellers/unterminate-seller.mdx +52 -0
- package/content/references/api/admin/sellers/update-seller.mdx +83 -0
- package/content/references/api/admin/sellers/upsert-payment-details.mdx +88 -0
- package/content/references/api/admin/sellers/upsert-professional-details.mdx +78 -0
- package/content/references/api/admin/sellers/upsert-seller-address.mdx +91 -0
- package/content/references/api/admin.mdx +134 -0
- package/content/references/api/conventions.mdx +109 -0
- package/content/references/api/store/carts/add-line-item.mdx +115 -0
- package/content/references/api/store/carts/add-shipping-methods.mdx +84 -0
- package/content/references/api/store/carts/apply-promotions.mdx +83 -0
- package/content/references/api/store/carts/complete-cart.mdx +98 -0
- package/content/references/api/store/offers/list-offers.mdx +161 -0
- package/content/references/api/store/offers/retrieve-offer.mdx +112 -0
- package/content/references/api/store/order-groups/list-order-groups.mdx +105 -0
- package/content/references/api/store/order-groups/retrieve-order-group.mdx +78 -0
- package/content/references/api/store/product-attributes/list-product-attributes.mdx +134 -0
- package/content/references/api/store/product-attributes/retrieve-product-attribute.mdx +78 -0
- package/content/references/api/store/product-categories/list-product-categories.mdx +126 -0
- package/content/references/api/store/product-categories/retrieve-product-category.mdx +79 -0
- package/content/references/api/store/products/list-products.mdx +184 -0
- package/content/references/api/store/products/retrieve-product.mdx +107 -0
- package/content/references/api/store/search/search.mdx +136 -0
- package/content/references/api/store/sellers/list-sellers.mdx +105 -0
- package/content/references/api/store/sellers/retrieve-seller.mdx +62 -0
- package/content/references/api/store/shipping-options/list-shipping-options.mdx +74 -0
- package/content/references/api/store.mdx +67 -0
- package/content/references/api/vendor/members/accept-member-invite.mdx +65 -0
- package/content/references/api/vendor/members/retrieve-current-member.mdx +51 -0
- package/content/references/api/vendor/members/update-current-member.mdx +70 -0
- package/content/references/api/vendor/offers/batch-create-offers.mdx +123 -0
- package/content/references/api/vendor/offers/batch-offer-inventory-items.mdx +103 -0
- package/content/references/api/vendor/offers/create-offer.mdx +141 -0
- package/content/references/api/vendor/offers/delete-offer.mdx +51 -0
- package/content/references/api/vendor/offers/list-offers.mdx +125 -0
- package/content/references/api/vendor/offers/retrieve-offer.mdx +74 -0
- package/content/references/api/vendor/offers/update-offer.mdx +82 -0
- package/content/references/api/vendor/orders/cancel-fulfillment.mdx +63 -0
- package/content/references/api/vendor/orders/cancel-order.mdx +56 -0
- package/content/references/api/vendor/orders/complete-order.mdx +55 -0
- package/content/references/api/vendor/orders/create-fulfillment.mdx +76 -0
- package/content/references/api/vendor/orders/create-shipment.mdx +99 -0
- package/content/references/api/vendor/orders/get-order-commission-lines.mdx +66 -0
- package/content/references/api/vendor/orders/list-order-changes.mdx +75 -0
- package/content/references/api/vendor/orders/list-orders.mdx +103 -0
- package/content/references/api/vendor/orders/mark-fulfillment-delivered.mdx +62 -0
- package/content/references/api/vendor/orders/preview-order.mdx +65 -0
- package/content/references/api/vendor/orders/retrieve-order.mdx +84 -0
- package/content/references/api/vendor/payout-accounts/create-onboarding.mdx +68 -0
- package/content/references/api/vendor/payout-accounts/create-payout-account.mdx +59 -0
- package/content/references/api/vendor/payout-accounts/retrieve-payout-account-by-id.mdx +60 -0
- package/content/references/api/vendor/payout-accounts/retrieve-payout-account.mdx +77 -0
- package/content/references/api/vendor/payouts/list-payouts.mdx +90 -0
- package/content/references/api/vendor/payouts/retrieve-payout.mdx +63 -0
- package/content/references/api/vendor/product-attributes/list-product-attributes.mdx +135 -0
- package/content/references/api/vendor/product-attributes/retrieve-product-attribute.mdx +71 -0
- package/content/references/api/vendor/product-variants/list-variants.mdx +136 -0
- package/content/references/api/vendor/products/batch-product-attributes.mdx +104 -0
- package/content/references/api/vendor/products/cancel-product-change.mdx +62 -0
- package/content/references/api/vendor/products/create-product-variant.mdx +92 -0
- package/content/references/api/vendor/products/create-product.mdx +197 -0
- package/content/references/api/vendor/products/delete-product-variant.mdx +68 -0
- package/content/references/api/vendor/products/delete-product.mdx +62 -0
- package/content/references/api/vendor/products/list-product-variants.mdx +114 -0
- package/content/references/api/vendor/products/list-products.mdx +163 -0
- package/content/references/api/vendor/products/preview-product.mdx +61 -0
- package/content/references/api/vendor/products/retrieve-product-variant.mdx +76 -0
- package/content/references/api/vendor/products/retrieve-product.mdx +69 -0
- package/content/references/api/vendor/products/update-product-variant.mdx +104 -0
- package/content/references/api/vendor/products/update-product.mdx +148 -0
- package/content/references/api/vendor/sellers/create-seller.mdx +150 -0
- package/content/references/api/vendor/sellers/delete-professional-details.mdx +54 -0
- package/content/references/api/vendor/sellers/invite-seller-member.mdx +67 -0
- package/content/references/api/vendor/sellers/list-member-invites.mdx +82 -0
- package/content/references/api/vendor/sellers/list-seller-members.mdx +80 -0
- package/content/references/api/vendor/sellers/list-sellers.mdx +71 -0
- package/content/references/api/vendor/sellers/remove-seller-member.mdx +48 -0
- package/content/references/api/vendor/sellers/retrieve-current-seller-member.mdx +59 -0
- package/content/references/api/vendor/sellers/retrieve-current-seller.mdx +69 -0
- package/content/references/api/vendor/sellers/select-seller.mdx +44 -0
- package/content/references/api/vendor/sellers/update-current-seller.mdx +108 -0
- package/content/references/api/vendor/sellers/update-member-role.mdx +51 -0
- package/content/references/api/vendor/sellers/upsert-payment-details.mdx +74 -0
- package/content/references/api/vendor/sellers/upsert-professional-details.mdx +70 -0
- package/content/references/api/vendor/sellers/upsert-seller-address.mdx +81 -0
- package/content/references/api/vendor.mdx +150 -0
- package/content/references/configuration.mdx +155 -0
- package/content/references/modules/commission.mdx +106 -0
- package/content/references/modules/custom-fields.mdx +45 -0
- package/content/references/modules/media.mdx +55 -0
- package/content/references/modules/offer.mdx +64 -0
- package/content/references/modules/payout.mdx +121 -0
- package/content/references/modules/product-attribute.mdx +111 -0
- package/content/references/modules/product-edit.mdx +80 -0
- package/content/references/modules/search.mdx +112 -0
- package/content/references/modules/seller.mdx +175 -0
- package/content/references/overview.mdx +70 -0
- package/content/references/workflows/cart/add-seller-shipping-method-to-cart.mdx +44 -0
- package/content/references/workflows/cart/complete-cart-with-split-orders.mdx +36 -0
- package/content/references/workflows/cart/list-seller-shipping-options-for-cart.mdx +39 -0
- package/content/references/workflows/cart/update-cart-seller-promotions.mdx +42 -0
- package/content/references/workflows/commission/batch-commission-rules.mdx +45 -0
- package/content/references/workflows/commission/create-commission-rates.mdx +41 -0
- package/content/references/workflows/commission/delete-commission-rates.mdx +34 -0
- package/content/references/workflows/commission/refresh-order-commission-lines.mdx +30 -0
- package/content/references/workflows/commission/update-commission-rates.mdx +35 -0
- package/content/references/workflows/media/set-category-images.mdx +41 -0
- package/content/references/workflows/media/set-collection-images.mdx +41 -0
- package/content/references/workflows/member/accept-member-invite.mdx +33 -0
- package/content/references/workflows/member/add-seller-member.mdx +30 -0
- package/content/references/workflows/member/create-member-invites.mdx +34 -0
- package/content/references/workflows/member/delete-member-invite.mdx +24 -0
- package/content/references/workflows/member/remove-seller-member.mdx +28 -0
- package/content/references/workflows/member/resend-member-invite.mdx +28 -0
- package/content/references/workflows/member/update-member-role.mdx +28 -0
- package/content/references/workflows/member/update-member.mdx +35 -0
- package/content/references/workflows/offer/batch-offer-inventory-items.mdx +58 -0
- package/content/references/workflows/offer/create-offers.mdx +63 -0
- package/content/references/workflows/offer/delete-offers.mdx +35 -0
- package/content/references/workflows/offer/update-offers.mdx +51 -0
- package/content/references/workflows/order/cancel-order-fulfillment.mdx +34 -0
- package/content/references/workflows/order/confirm-claim-request.mdx +25 -0
- package/content/references/workflows/order/confirm-exchange-request.mdx +25 -0
- package/content/references/workflows/order/confirm-order-edit-request.mdx +25 -0
- package/content/references/workflows/order/confirm-return-receive.mdx +25 -0
- package/content/references/workflows/order/create-order-fulfillment.mdx +45 -0
- package/content/references/workflows/order-group/get-order-group-detail.mdx +29 -0
- package/content/references/workflows/order-group/get-order-groups-list.mdx +36 -0
- package/content/references/workflows/overview.mdx +72 -0
- package/content/references/workflows/payout/create-onboarding.mdx +36 -0
- package/content/references/workflows/payout/create-payout-account.mdx +33 -0
- package/content/references/workflows/payout/create-payout.mdx +30 -0
- package/content/references/workflows/payout/process-payout-for-webhook.mdx +32 -0
- package/content/references/workflows/product/confirm-products.mdx +46 -0
- package/content/references/workflows/product/create-products.mdx +63 -0
- package/content/references/workflows/product/link-sellers-to-product-category.mdx +40 -0
- package/content/references/workflows/product/link-sellers-to-product.mdx +40 -0
- package/content/references/workflows/product/reject-product.mdx +46 -0
- package/content/references/workflows/product/request-product-change.mdx +46 -0
- package/content/references/workflows/product-attribute/add-product-attributes-to-product.mdx +49 -0
- package/content/references/workflows/product-attribute/create-and-link-product-attributes-to-product.mdx +46 -0
- package/content/references/workflows/product-attribute/create-product-attribute-values.mdx +43 -0
- package/content/references/workflows/product-attribute/create-product-attributes.mdx +56 -0
- package/content/references/workflows/product-attribute/delete-product-attribute-values.mdx +30 -0
- package/content/references/workflows/product-attribute/delete-product-attributes.mdx +30 -0
- package/content/references/workflows/product-attribute/remove-product-attributes-from-product.mdx +29 -0
- package/content/references/workflows/product-attribute/update-product-attribute-values.mdx +44 -0
- package/content/references/workflows/product-attribute/update-product-attributes-on-product.mdx +41 -0
- package/content/references/workflows/product-attribute/update-product-attributes.mdx +48 -0
- package/content/references/workflows/product-attribute/upsert-product-attribute-values.mdx +43 -0
- package/content/references/workflows/product-edit/auto-confirm-product-change.mdx +39 -0
- package/content/references/workflows/product-edit/cancel-product-change.mdx +49 -0
- package/content/references/workflows/product-edit/confirm-product-change.mdx +57 -0
- package/content/references/workflows/product-edit/create-product-change.mdx +72 -0
- package/content/references/workflows/product-edit/reject-product-change.mdx +54 -0
- package/content/references/workflows/product-edit/stage-product-change.mdx +75 -0
- package/content/references/workflows/seller/approve-seller.mdx +34 -0
- package/content/references/workflows/seller/create-seller-account.mdx +59 -0
- package/content/references/workflows/seller/create-seller-defaults.mdx +22 -0
- package/content/references/workflows/seller/create-sellers.mdx +65 -0
- package/content/references/workflows/seller/delete-seller-professional-details.mdx +37 -0
- package/content/references/workflows/seller/delete-sellers.mdx +24 -0
- package/content/references/workflows/seller/invite-seller.mdx +28 -0
- package/content/references/workflows/seller/suspend-seller.mdx +35 -0
- package/content/references/workflows/seller/terminate-seller.mdx +35 -0
- package/content/references/workflows/seller/unsuspend-seller.mdx +34 -0
- package/content/references/workflows/seller/unterminate-seller.mdx +34 -0
- package/content/references/workflows/seller/update-seller-address.mdx +55 -0
- package/content/references/workflows/seller/update-seller-payment-details.mdx +52 -0
- package/content/references/workflows/seller/update-seller-professional-details.mdx +48 -0
- package/content/references/workflows/seller/update-sellers.mdx +57 -0
- package/content/resources/ai/llms.mdx +74 -0
- package/content/resources/ai/mcp.mdx +152 -0
- package/content/resources/ai/overview.mdx +97 -0
- package/content/resources/customization/custom-fields.mdx +182 -0
- package/content/resources/customization/extend-a-workflow.mdx +39 -0
- package/content/resources/customization/extending-panels.mdx +309 -0
- package/content/resources/deployment/medusa-cloud.mdx +167 -0
- package/content/resources/integrations/notifications.mdx +39 -0
- package/content/resources/integrations/search.mdx +122 -0
- package/content/resources/integrations/stripe-connect.mdx +395 -0
- package/content/resources/tutorials/add-a-block.mdx +74 -0
- package/content/resources/tutorials/attributes-and-variant-axes.mdx +111 -0
- package/content/resources/tutorials/build-a-block.mdx +134 -0
- package/content/resources/tutorials/configure-commissions.mdx +127 -0
- package/content/resources/tutorials/custom-api-route.mdx +142 -0
- package/content/resources/tutorials/custom-panel-page.mdx +78 -0
- package/content/resources/tutorials/first-marketplace.mdx +45 -0
- package/content/resources/tutorials/handle-product-requests.mdx +80 -0
- package/content/resources/tutorials/import-export-products.mdx +96 -0
- package/content/resources/tutorials/master-products-and-offers.mdx +89 -0
- package/content/resources/tutorials/recompose-a-page.mdx +129 -0
- package/content/resources/tutorials/replace-panel-components.mdx +116 -0
- package/content/resources/tutorials/seller-payouts-stripe.mdx +89 -0
- package/content/telemetry.mdx +67 -0
- package/content/tools/api-client.mdx +155 -0
- package/content/tools/cli.mdx +196 -0
- package/content/tools/dashboard-sdk.mdx +35 -0
- package/content/user-guide/admin/overview.mdx +23 -0
- package/content/user-guide/admin/stores.mdx +193 -0
- package/content/user-guide/vendor/overview.mdx +23 -0
- package/content/user-guide/vendor/stores.mdx +209 -0
- package/llms.txt +307 -0
- package/package.json +33 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Retrieve Product"
|
|
3
|
+
api: "GET /store/products/{id}"
|
|
4
|
+
description: "Retrieve a published product by ID."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Returns a single published product; a `404` is returned if the product is unpublished or its seller is not visible.
|
|
8
|
+
|
|
9
|
+
<Note>
|
|
10
|
+
Customer authentication is optional. When a customer token is provided, the customer's group memberships enter the pricing context used for `variants.calculated_price`. Prices are computed only when `variants.calculated_price` is requested in `fields` (or `region_id` is passed) and reflect the cheapest offer per variant.
|
|
11
|
+
</Note>
|
|
12
|
+
|
|
13
|
+
## Path parameters
|
|
14
|
+
|
|
15
|
+
<ParamField path="id" type="string" required>
|
|
16
|
+
The product's ID.
|
|
17
|
+
</ParamField>
|
|
18
|
+
|
|
19
|
+
## Query parameters
|
|
20
|
+
|
|
21
|
+
<ParamField query="fields" type="string">
|
|
22
|
+
Comma-separated fields and relations to include; prefix with `+`/`-` to add to or remove from the defaults.
|
|
23
|
+
</ParamField>
|
|
24
|
+
|
|
25
|
+
<ParamField query="region_id" type="string">
|
|
26
|
+
Region used to build the pricing context for `variants.calculated_price`.
|
|
27
|
+
</ParamField>
|
|
28
|
+
|
|
29
|
+
<ParamField query="currency_code" type="string">
|
|
30
|
+
Currency used in the pricing context.
|
|
31
|
+
</ParamField>
|
|
32
|
+
|
|
33
|
+
## Response
|
|
34
|
+
|
|
35
|
+
<ResponseField name="product" type="object">
|
|
36
|
+
<Expandable title="properties">
|
|
37
|
+
<ResponseField name="id" type="string">The product's ID.</ResponseField>
|
|
38
|
+
<ResponseField name="title" type="string">The product's title.</ResponseField>
|
|
39
|
+
<ResponseField name="handle" type="string">URL-safe handle.</ResponseField>
|
|
40
|
+
<ResponseField name="status" type="string">Always `published` on the store API.</ResponseField>
|
|
41
|
+
<ResponseField name="description" type="string | null">The product's description.</ResponseField>
|
|
42
|
+
<ResponseField name="thumbnail" type="string | null">Thumbnail URL.</ResponseField>
|
|
43
|
+
<ResponseField name="collection" type="object | null">The product's collection.</ResponseField>
|
|
44
|
+
<ResponseField name="type" type="object | null">The product's type.</ResponseField>
|
|
45
|
+
<ResponseField name="tags" type="object[]">The product's tags.</ResponseField>
|
|
46
|
+
<ResponseField name="images" type="object[]">The product's images.</ResponseField>
|
|
47
|
+
<ResponseField name="categories" type="object[]">The product's categories.</ResponseField>
|
|
48
|
+
<ResponseField name="options" type="object[]">Product options with their values.</ResponseField>
|
|
49
|
+
<ResponseField name="variants" type="object[]">
|
|
50
|
+
Product variants; `calculated_price` and `offer_id` are added when requested and reflect the cheapest offer.
|
|
51
|
+
</ResponseField>
|
|
52
|
+
<ResponseField name="product_attribute_values" type="object[]">Attribute values assigned to the product.</ResponseField>
|
|
53
|
+
<ResponseField name="scoped_attributes" type="object[]">Attributes scoped to this product, with their values.</ResponseField>
|
|
54
|
+
<ResponseField name="metadata" type="object | null">Custom key-value data.</ResponseField>
|
|
55
|
+
</Expandable>
|
|
56
|
+
</ResponseField>
|
|
57
|
+
|
|
58
|
+
<RequestExample>
|
|
59
|
+
```bash cURL
|
|
60
|
+
curl 'http://localhost:9000/store/products/prod_01JB2K5M8N?region_id=reg_01JB2K4S1T&fields=*variants.calculated_price' \
|
|
61
|
+
-H 'x-publishable-api-key: pk_01JB2K3XYZ'
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```ts JS Client
|
|
65
|
+
const { product } = await client.store.products.$id.query({
|
|
66
|
+
$id: "prod_01JB2K5M8N",
|
|
67
|
+
region_id: "reg_01JB2K4S1T",
|
|
68
|
+
fields: "*variants.calculated_price",
|
|
69
|
+
})
|
|
70
|
+
```
|
|
71
|
+
</RequestExample>
|
|
72
|
+
|
|
73
|
+
<ResponseExample>
|
|
74
|
+
```json 200
|
|
75
|
+
{
|
|
76
|
+
"product": {
|
|
77
|
+
"id": "prod_01JB2K5M8N",
|
|
78
|
+
"title": "Linen Shirt",
|
|
79
|
+
"handle": "linen-shirt",
|
|
80
|
+
"status": "published",
|
|
81
|
+
"description": "A breathable linen shirt.",
|
|
82
|
+
"thumbnail": "https://cdn.example.com/linen-shirt.png",
|
|
83
|
+
"collection": null,
|
|
84
|
+
"type": null,
|
|
85
|
+
"tags": [],
|
|
86
|
+
"images": [],
|
|
87
|
+
"categories": [{ "id": "pcat_01JB2K6A2B", "name": "Shirts" }],
|
|
88
|
+
"options": [{ "id": "opt_01JB2K6C3D", "title": "Size", "values": [{ "value": "M" }] }],
|
|
89
|
+
"variants": [
|
|
90
|
+
{
|
|
91
|
+
"id": "variant_01JB2K6E4F",
|
|
92
|
+
"title": "M",
|
|
93
|
+
"offer_id": "offer_01JB2K6G5H",
|
|
94
|
+
"calculated_price": {
|
|
95
|
+
"calculated_amount": 4500,
|
|
96
|
+
"original_amount": 5000,
|
|
97
|
+
"currency_code": "eur"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"product_attribute_values": [],
|
|
102
|
+
"scoped_attributes": [],
|
|
103
|
+
"metadata": null
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
</ResponseExample>
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Search"
|
|
3
|
+
api: "POST /store/search"
|
|
4
|
+
description: "Query the search index across products and offers."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Runs a full-text query against the active search provider's index of products and offers.
|
|
8
|
+
|
|
9
|
+
<Note>
|
|
10
|
+
Customer authentication is optional. When a customer token is provided together with `region_id`, the customer's group memberships enter the pricing context, so hits can carry group-specific `calculated_price` values.
|
|
11
|
+
</Note>
|
|
12
|
+
|
|
13
|
+
## Body parameters
|
|
14
|
+
|
|
15
|
+
<ParamField body="q" type="string" default="">
|
|
16
|
+
Search query.
|
|
17
|
+
</ParamField>
|
|
18
|
+
|
|
19
|
+
<ParamField body="limit" type="number" default="12">
|
|
20
|
+
Maximum number of hits to return; minimum `1`, maximum `100`.
|
|
21
|
+
</ParamField>
|
|
22
|
+
|
|
23
|
+
<ParamField body="offset" type="number" default="0">
|
|
24
|
+
Number of hits to skip before collecting results.
|
|
25
|
+
</ParamField>
|
|
26
|
+
|
|
27
|
+
<ParamField body="region_id" type="string">
|
|
28
|
+
Region used to build the pricing context; without it, hits have no `calculated_price`.
|
|
29
|
+
</ParamField>
|
|
30
|
+
|
|
31
|
+
<ParamField body="country_code" type="string">
|
|
32
|
+
Country used for the tax context when the region has automatic taxes.
|
|
33
|
+
</ParamField>
|
|
34
|
+
|
|
35
|
+
<ParamField body="province" type="string">
|
|
36
|
+
Province used for the tax context.
|
|
37
|
+
</ParamField>
|
|
38
|
+
|
|
39
|
+
<ParamField body="filters" type="object">
|
|
40
|
+
Provider-owned filter object passed straight to the active search provider, which defines its shape (for example category, collection, or attribute filters).
|
|
41
|
+
</ParamField>
|
|
42
|
+
|
|
43
|
+
## Response
|
|
44
|
+
|
|
45
|
+
<ResponseField name="hits" type="object[]">
|
|
46
|
+
<Expandable title="properties">
|
|
47
|
+
<ResponseField name="id" type="string">The document's ID.</ResponseField>
|
|
48
|
+
<ResponseField name="type" type="string">One of `product` or `offer`.</ResponseField>
|
|
49
|
+
<ResponseField name="title" type="string">Display title.</ResponseField>
|
|
50
|
+
<ResponseField name="description" type="string">Description text.</ResponseField>
|
|
51
|
+
<ResponseField name="handle" type="string">URL-safe handle.</ResponseField>
|
|
52
|
+
<ResponseField name="thumbnail" type="string">Thumbnail URL.</ResponseField>
|
|
53
|
+
<ResponseField name="seller_handle" type="string">Handle of the owning seller.</ResponseField>
|
|
54
|
+
<ResponseField name="collection_id" type="string">ID of the product's collection.</ResponseField>
|
|
55
|
+
<ResponseField name="collection" type="string">Title of the product's collection.</ResponseField>
|
|
56
|
+
<ResponseField name="category_ids" type="string[]">IDs of the product's categories.</ResponseField>
|
|
57
|
+
<ResponseField name="categories" type="string[]">Names of the product's categories.</ResponseField>
|
|
58
|
+
<ResponseField name="product_id" type="string">Product ID (offer documents).</ResponseField>
|
|
59
|
+
<ResponseField name="variant_id" type="string">Variant ID (offer documents).</ResponseField>
|
|
60
|
+
<ResponseField name="sku" type="string">Offer SKU (offer documents).</ResponseField>
|
|
61
|
+
<ResponseField name="attributes" type="object[]">Filterable attributes with their values.</ResponseField>
|
|
62
|
+
<ResponseField name="calculated_price" type="object | null">
|
|
63
|
+
Price for the requested pricing context, with `calculated_amount`, `original_amount`, and `currency_code`.
|
|
64
|
+
</ResponseField>
|
|
65
|
+
</Expandable>
|
|
66
|
+
</ResponseField>
|
|
67
|
+
|
|
68
|
+
<ResponseField name="count" type="number">Total number of matching documents.</ResponseField>
|
|
69
|
+
<ResponseField name="limit" type="number">The applied limit.</ResponseField>
|
|
70
|
+
<ResponseField name="offset" type="number">The applied offset.</ResponseField>
|
|
71
|
+
|
|
72
|
+
<ResponseField name="facets" type="object">
|
|
73
|
+
<Expandable title="properties">
|
|
74
|
+
<ResponseField name="collections" type="object[]">Collection facets with `id`, `label`, and `count`.</ResponseField>
|
|
75
|
+
<ResponseField name="categories" type="object[]">Category facets with `id`, `label`, and `count`.</ResponseField>
|
|
76
|
+
<ResponseField name="attributes" type="object[]">Attribute facets with `handle`, `label`, and value counts.</ResponseField>
|
|
77
|
+
</Expandable>
|
|
78
|
+
</ResponseField>
|
|
79
|
+
|
|
80
|
+
<RequestExample>
|
|
81
|
+
```bash cURL
|
|
82
|
+
curl -X POST 'http://localhost:9000/store/search' \
|
|
83
|
+
-H 'Content-Type: application/json' \
|
|
84
|
+
-H 'x-publishable-api-key: pk_01JB2K3XYZ' \
|
|
85
|
+
-d '{"q": "linen shirt", "limit": 12, "region_id": "reg_01JB2K4S1T"}'
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
```ts JS Client
|
|
89
|
+
const { hits, count, facets } = await client.store.search.mutate({
|
|
90
|
+
q: "linen shirt",
|
|
91
|
+
limit: 12,
|
|
92
|
+
region_id: "reg_01JB2K4S1T",
|
|
93
|
+
})
|
|
94
|
+
```
|
|
95
|
+
</RequestExample>
|
|
96
|
+
|
|
97
|
+
<ResponseExample>
|
|
98
|
+
```json 200
|
|
99
|
+
{
|
|
100
|
+
"hits": [
|
|
101
|
+
{
|
|
102
|
+
"id": "offer_01JB2K6G5H",
|
|
103
|
+
"type": "offer",
|
|
104
|
+
"title": "Linen Shirt",
|
|
105
|
+
"handle": "linen-shirt",
|
|
106
|
+
"thumbnail": "https://cdn.example.com/linen-shirt.png",
|
|
107
|
+
"seller_handle": "nordic-textiles",
|
|
108
|
+
"product_id": "prod_01JB2K5M8N",
|
|
109
|
+
"variant_id": "variant_01JB2K6E4F",
|
|
110
|
+
"sku": "NT-LINEN-M",
|
|
111
|
+
"category_ids": ["pcat_01JB2K6A2B"],
|
|
112
|
+
"categories": ["Shirts"],
|
|
113
|
+
"calculated_price": {
|
|
114
|
+
"calculated_amount": 4500,
|
|
115
|
+
"original_amount": 5000,
|
|
116
|
+
"currency_code": "eur"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"count": 42,
|
|
121
|
+
"limit": 12,
|
|
122
|
+
"offset": 0,
|
|
123
|
+
"facets": {
|
|
124
|
+
"collections": [],
|
|
125
|
+
"categories": [{ "id": "pcat_01JB2K6A2B", "label": "Shirts", "count": 42 }],
|
|
126
|
+
"attributes": [
|
|
127
|
+
{
|
|
128
|
+
"handle": "material",
|
|
129
|
+
"label": "Material",
|
|
130
|
+
"values": [{ "id": "attrval_01JB2K7C2D", "label": "Linen", "count": 30 }]
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
</ResponseExample>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "List Sellers"
|
|
3
|
+
api: "GET /store/sellers"
|
|
4
|
+
description: "Retrieve open sellers visible on the storefront."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Returns a paginated list of sellers; only sellers with status `open` that are outside any scheduled closure window (`closed_from` / `closed_to`) are included.
|
|
8
|
+
|
|
9
|
+
## Query parameters
|
|
10
|
+
|
|
11
|
+
<ParamField query="limit" type="number" default="50">
|
|
12
|
+
Maximum number of sellers to return.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
<ParamField query="offset" type="number" default="0">
|
|
16
|
+
Number of sellers to skip before collecting results.
|
|
17
|
+
</ParamField>
|
|
18
|
+
|
|
19
|
+
<ParamField query="order" type="string">
|
|
20
|
+
Field to sort by, prefixed with `-` for descending order.
|
|
21
|
+
</ParamField>
|
|
22
|
+
|
|
23
|
+
<ParamField query="fields" type="string">
|
|
24
|
+
Comma-separated fields and relations to include; prefix with `+`/`-` to add to or remove from the defaults.
|
|
25
|
+
</ParamField>
|
|
26
|
+
|
|
27
|
+
<ParamField query="q" type="string">
|
|
28
|
+
Free-text search term applied to seller fields.
|
|
29
|
+
</ParamField>
|
|
30
|
+
|
|
31
|
+
<ParamField query="id" type="string | string[]">
|
|
32
|
+
Filter by one or more seller IDs.
|
|
33
|
+
</ParamField>
|
|
34
|
+
|
|
35
|
+
<ParamField query="name" type="string | string[]">
|
|
36
|
+
Filter by one or more seller names.
|
|
37
|
+
</ParamField>
|
|
38
|
+
|
|
39
|
+
<ParamField query="handle" type="string">
|
|
40
|
+
Filter by seller handle.
|
|
41
|
+
</ParamField>
|
|
42
|
+
|
|
43
|
+
<ParamField query="is_premium" type="boolean">
|
|
44
|
+
Filter premium sellers.
|
|
45
|
+
</ParamField>
|
|
46
|
+
|
|
47
|
+
<ParamField query="created_at" type="object">
|
|
48
|
+
Filter by creation date using operators like `$gt`, `$gte`, `$lt`, `$lte`.
|
|
49
|
+
</ParamField>
|
|
50
|
+
|
|
51
|
+
<ParamField query="updated_at" type="object">
|
|
52
|
+
Filter by update date using operators like `$gt`, `$gte`, `$lt`, `$lte`.
|
|
53
|
+
</ParamField>
|
|
54
|
+
|
|
55
|
+
## Response
|
|
56
|
+
|
|
57
|
+
<ResponseField name="sellers" type="object[]">
|
|
58
|
+
<Expandable title="properties">
|
|
59
|
+
<ResponseField name="id" type="string">The seller's ID.</ResponseField>
|
|
60
|
+
<ResponseField name="name" type="string">The seller's display name.</ResponseField>
|
|
61
|
+
<ResponseField name="handle" type="string">URL-safe handle.</ResponseField>
|
|
62
|
+
<ResponseField name="description" type="string | null">The seller's storefront description.</ResponseField>
|
|
63
|
+
<ResponseField name="logo" type="string | null">Logo URL.</ResponseField>
|
|
64
|
+
<ResponseField name="banner" type="string | null">Banner image URL.</ResponseField>
|
|
65
|
+
<ResponseField name="is_premium" type="boolean">Whether the seller has premium status.</ResponseField>
|
|
66
|
+
<ResponseField name="metadata" type="object | null">Custom key-value data.</ResponseField>
|
|
67
|
+
</Expandable>
|
|
68
|
+
</ResponseField>
|
|
69
|
+
|
|
70
|
+
<ResponseField name="count" type="number">Total number of matching sellers.</ResponseField>
|
|
71
|
+
<ResponseField name="offset" type="number">Number of skipped sellers.</ResponseField>
|
|
72
|
+
<ResponseField name="limit" type="number">Maximum number of returned sellers.</ResponseField>
|
|
73
|
+
|
|
74
|
+
<RequestExample>
|
|
75
|
+
```bash cURL
|
|
76
|
+
curl 'http://localhost:9000/store/sellers?limit=20' \
|
|
77
|
+
-H 'x-publishable-api-key: pk_01JB2K3XYZ'
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
```ts JS Client
|
|
81
|
+
const { sellers, count } = await client.store.sellers.query({ limit: 20 })
|
|
82
|
+
```
|
|
83
|
+
</RequestExample>
|
|
84
|
+
|
|
85
|
+
<ResponseExample>
|
|
86
|
+
```json 200
|
|
87
|
+
{
|
|
88
|
+
"sellers": [
|
|
89
|
+
{
|
|
90
|
+
"id": "sel_01JB2K8A1B",
|
|
91
|
+
"name": "Nordic Textiles",
|
|
92
|
+
"handle": "nordic-textiles",
|
|
93
|
+
"description": "Scandinavian linen and wool.",
|
|
94
|
+
"logo": "https://cdn.example.com/nordic-logo.png",
|
|
95
|
+
"banner": null,
|
|
96
|
+
"is_premium": false,
|
|
97
|
+
"metadata": null
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"count": 12,
|
|
101
|
+
"offset": 0,
|
|
102
|
+
"limit": 20
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
</ResponseExample>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Retrieve Seller"
|
|
3
|
+
api: "GET /store/sellers/{id}"
|
|
4
|
+
description: "Retrieve an open seller by ID."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Returns a single seller; sellers that are not `open` or are inside a scheduled closure window return a `404`.
|
|
8
|
+
|
|
9
|
+
## Path parameters
|
|
10
|
+
|
|
11
|
+
<ParamField path="id" type="string" required>
|
|
12
|
+
The seller's ID.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
## Query parameters
|
|
16
|
+
|
|
17
|
+
<ParamField query="fields" type="string">
|
|
18
|
+
Comma-separated fields and relations to include; prefix with `+`/`-` to add to or remove from the defaults.
|
|
19
|
+
</ParamField>
|
|
20
|
+
|
|
21
|
+
## Response
|
|
22
|
+
|
|
23
|
+
<ResponseField name="seller" type="object">
|
|
24
|
+
<Expandable title="properties">
|
|
25
|
+
<ResponseField name="id" type="string">The seller's ID.</ResponseField>
|
|
26
|
+
<ResponseField name="name" type="string">The seller's display name.</ResponseField>
|
|
27
|
+
<ResponseField name="handle" type="string">URL-safe handle.</ResponseField>
|
|
28
|
+
<ResponseField name="description" type="string | null">The seller's storefront description.</ResponseField>
|
|
29
|
+
<ResponseField name="logo" type="string | null">Logo URL.</ResponseField>
|
|
30
|
+
<ResponseField name="banner" type="string | null">Banner image URL.</ResponseField>
|
|
31
|
+
<ResponseField name="is_premium" type="boolean">Whether the seller has premium status.</ResponseField>
|
|
32
|
+
<ResponseField name="metadata" type="object | null">Custom key-value data.</ResponseField>
|
|
33
|
+
</Expandable>
|
|
34
|
+
</ResponseField>
|
|
35
|
+
|
|
36
|
+
<RequestExample>
|
|
37
|
+
```bash cURL
|
|
38
|
+
curl 'http://localhost:9000/store/sellers/sel_01JB2K8A1B' \
|
|
39
|
+
-H 'x-publishable-api-key: pk_01JB2K3XYZ'
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```ts JS Client
|
|
43
|
+
const { seller } = await client.store.sellers.$id.query({ $id: "sel_01JB2K8A1B" })
|
|
44
|
+
```
|
|
45
|
+
</RequestExample>
|
|
46
|
+
|
|
47
|
+
<ResponseExample>
|
|
48
|
+
```json 200
|
|
49
|
+
{
|
|
50
|
+
"seller": {
|
|
51
|
+
"id": "sel_01JB2K8A1B",
|
|
52
|
+
"name": "Nordic Textiles",
|
|
53
|
+
"handle": "nordic-textiles",
|
|
54
|
+
"description": "Scandinavian linen and wool.",
|
|
55
|
+
"logo": "https://cdn.example.com/nordic-logo.png",
|
|
56
|
+
"banner": null,
|
|
57
|
+
"is_premium": false,
|
|
58
|
+
"metadata": null
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
</ResponseExample>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "List Shipping Options"
|
|
3
|
+
api: "GET /store/shipping-options"
|
|
4
|
+
description: "Retrieve available shipping options for a cart, grouped by seller."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Returns the shipping options that can fulfill the given cart, grouped by the seller of the items each option applies to.
|
|
8
|
+
|
|
9
|
+
## Query parameters
|
|
10
|
+
|
|
11
|
+
<ParamField query="cart_id" type="string" required>
|
|
12
|
+
ID of the cart to list shipping options for.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
<ParamField query="is_return" type="boolean">
|
|
16
|
+
Set to `true` to list return shipping options.
|
|
17
|
+
</ParamField>
|
|
18
|
+
|
|
19
|
+
<ParamField query="fields" type="string">
|
|
20
|
+
Comma-separated fields and relations to include on each shipping option; prefix with `+`/`-` to add to or remove from the defaults.
|
|
21
|
+
</ParamField>
|
|
22
|
+
|
|
23
|
+
## Response
|
|
24
|
+
|
|
25
|
+
<ResponseField name="shipping_options" type="object">
|
|
26
|
+
Map of seller ID to the shipping options available for that seller's items.
|
|
27
|
+
<Expandable title="properties">
|
|
28
|
+
<ResponseField name="{seller_id}" type="object[]">
|
|
29
|
+
Shipping options for the seller, each with `id`, `name`, `price_type`, `provider_id`, calculated `amount`, and `type`.
|
|
30
|
+
</ResponseField>
|
|
31
|
+
</Expandable>
|
|
32
|
+
</ResponseField>
|
|
33
|
+
|
|
34
|
+
<RequestExample>
|
|
35
|
+
```bash cURL
|
|
36
|
+
curl 'http://localhost:9000/store/shipping-options?cart_id=cart_01JB2KB1CD' \
|
|
37
|
+
-H 'x-publishable-api-key: pk_01JB2K3XYZ'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```ts JS Client
|
|
41
|
+
const { shipping_options } = await client.store.shippingOptions.query({
|
|
42
|
+
cart_id: "cart_01JB2KB1CD",
|
|
43
|
+
})
|
|
44
|
+
```
|
|
45
|
+
</RequestExample>
|
|
46
|
+
|
|
47
|
+
<ResponseExample>
|
|
48
|
+
```json 200
|
|
49
|
+
{
|
|
50
|
+
"shipping_options": {
|
|
51
|
+
"sel_01JB2K8A1B": [
|
|
52
|
+
{
|
|
53
|
+
"id": "so_01JB2KC4GH",
|
|
54
|
+
"name": "Standard Shipping",
|
|
55
|
+
"price_type": "flat",
|
|
56
|
+
"provider_id": "manual_manual",
|
|
57
|
+
"amount": 900,
|
|
58
|
+
"type": { "label": "Standard", "code": "standard" }
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"sel_01JB2KF9ST": [
|
|
62
|
+
{
|
|
63
|
+
"id": "so_01JB2KG0UV",
|
|
64
|
+
"name": "Express",
|
|
65
|
+
"price_type": "flat",
|
|
66
|
+
"provider_id": "manual_manual",
|
|
67
|
+
"amount": 1500,
|
|
68
|
+
"type": { "label": "Express", "code": "express" }
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
</ResponseExample>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Store API"
|
|
3
|
+
description: "Storefront routes under /store/* — discovery, multi-vendor carts, checkout, and order groups."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The Store API is what a storefront talks to. It extends Medusa's store routes with marketplace discovery (sellers, offers, search) and replaces the cart completion flow with the multi-vendor order-group split.
|
|
7
|
+
|
|
8
|
+
Most routes are public; customer authentication requirements are noted per group. See [API conventions](/rc/references/api/conventions) for pagination and field selection.
|
|
9
|
+
|
|
10
|
+
## Products and discovery
|
|
11
|
+
|
|
12
|
+
| Method | Path | Purpose |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `GET` | `/store/products` | List published products (filtered to sellers visible to the shopper) |
|
|
15
|
+
| `GET` | `/store/products/:id` | Retrieve a product |
|
|
16
|
+
| `GET` | `/store/product-categories[/:id]` | Category tree with media and icons |
|
|
17
|
+
| `GET` | `/store/product-attributes[/:id]` | Filterable attributes for building facet UIs |
|
|
18
|
+
|
|
19
|
+
## Search
|
|
20
|
+
|
|
21
|
+
| Method | Path | Purpose |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| `POST` | `/store/search` | Query the search index across products and offers |
|
|
24
|
+
|
|
25
|
+
Request body: `q`, `limit` (default 12, max 100), `offset`, pricing context (`region_id`, `country_code`, `province`), and provider-owned `filters`. Response: `{ hits, count, limit, offset, facets }` with pre-labelled collection, category, and attribute facets. See the [Search module](/rc/references/modules/search) for document shapes and filter semantics.
|
|
26
|
+
|
|
27
|
+
## Sellers
|
|
28
|
+
|
|
29
|
+
| Method | Path | Purpose |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| `GET` | `/store/sellers` | List public seller storefronts (only `open` sellers outside a closure window) |
|
|
32
|
+
| `GET` | `/store/sellers/:id` | Retrieve a seller storefront |
|
|
33
|
+
|
|
34
|
+
## Offers
|
|
35
|
+
|
|
36
|
+
| Method | Path | Purpose |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `GET` | `/store/offers` | List offers, with per-offer calculated prices |
|
|
39
|
+
| `GET` | `/store/offers/:id` | Retrieve an offer |
|
|
40
|
+
|
|
41
|
+
## Carts and checkout
|
|
42
|
+
|
|
43
|
+
Mercur overrides the cart routes so a single cart can span multiple sellers:
|
|
44
|
+
|
|
45
|
+
| Method | Path | Purpose |
|
|
46
|
+
| --- | --- | --- |
|
|
47
|
+
| `POST` | `/store/carts/:id/line-items` | Add a line item (offer-aware, multi-seller) |
|
|
48
|
+
| `POST` | `/store/carts/:id/shipping-methods` | Add per-seller shipping methods |
|
|
49
|
+
| `GET` | `/store/shipping-options` | Shipping options available for the cart, grouped by seller |
|
|
50
|
+
| `POST` | `/store/carts/:id/promotions` | Apply promotions |
|
|
51
|
+
| `POST` | `/store/carts/:id/complete` | Complete the cart — splits it into per-seller orders under an order group |
|
|
52
|
+
|
|
53
|
+
## Order groups
|
|
54
|
+
|
|
55
|
+
Customer authentication **required**.
|
|
56
|
+
|
|
57
|
+
| Method | Path | Purpose |
|
|
58
|
+
| --- | --- | --- |
|
|
59
|
+
| `GET` | `/store/order-groups` | The customer's order groups |
|
|
60
|
+
| `GET` | `/store/order-groups/:id` | An order group with its per-seller child orders |
|
|
61
|
+
|
|
62
|
+
## Next steps
|
|
63
|
+
|
|
64
|
+
<CardGroup cols={2}>
|
|
65
|
+
<Card title="Order groups" href="/rc/learn/order-groups" />
|
|
66
|
+
<Card title="Search module" href="/rc/references/modules/search" />
|
|
67
|
+
</CardGroup>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Accept Member Invite"
|
|
3
|
+
api: "POST /vendor/members/invites/accept"
|
|
4
|
+
description: "Accept a seller team invite using its token."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Accepts a member invite and joins the inviting seller's team.
|
|
8
|
+
|
|
9
|
+
<Note>
|
|
10
|
+
This is a public route — no `Authorization` or `x-seller-id` header is required. The invite is identified by the `invite_token` sent in the invitation email.
|
|
11
|
+
</Note>
|
|
12
|
+
|
|
13
|
+
## Body parameters
|
|
14
|
+
|
|
15
|
+
<ParamField body="invite_token" type="string" required>
|
|
16
|
+
The token from the invitation email.
|
|
17
|
+
</ParamField>
|
|
18
|
+
|
|
19
|
+
<ParamField body="first_name" type="string">
|
|
20
|
+
First name for the new member profile.
|
|
21
|
+
</ParamField>
|
|
22
|
+
|
|
23
|
+
<ParamField body="last_name" type="string">
|
|
24
|
+
Last name for the new member profile.
|
|
25
|
+
</ParamField>
|
|
26
|
+
|
|
27
|
+
## Response
|
|
28
|
+
|
|
29
|
+
<ResponseField name="member" type="object">
|
|
30
|
+
<Expandable title="properties">
|
|
31
|
+
<ResponseField name="id" type="string">The member's ID.</ResponseField>
|
|
32
|
+
<ResponseField name="first_name" type="string">The member's first name.</ResponseField>
|
|
33
|
+
<ResponseField name="last_name" type="string">The member's last name.</ResponseField>
|
|
34
|
+
<ResponseField name="email" type="string">The member's email.</ResponseField>
|
|
35
|
+
</Expandable>
|
|
36
|
+
</ResponseField>
|
|
37
|
+
|
|
38
|
+
<RequestExample>
|
|
39
|
+
```bash cURL
|
|
40
|
+
curl -X POST 'http://localhost:9000/vendor/members/invites/accept' \
|
|
41
|
+
-H 'Content-Type: application/json' \
|
|
42
|
+
-d '{"invite_token": "<invite_token>", "first_name": "John", "last_name": "Roe"}'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```ts JS Client
|
|
46
|
+
const { member } = await client.vendor.members.invites.accept.mutate({
|
|
47
|
+
invite_token: "<invite_token>",
|
|
48
|
+
first_name: "John",
|
|
49
|
+
last_name: "Roe",
|
|
50
|
+
})
|
|
51
|
+
```
|
|
52
|
+
</RequestExample>
|
|
53
|
+
|
|
54
|
+
<ResponseExample>
|
|
55
|
+
```json 200
|
|
56
|
+
{
|
|
57
|
+
"member": {
|
|
58
|
+
"id": "mem_01HXYZ",
|
|
59
|
+
"first_name": "John",
|
|
60
|
+
"last_name": "Roe",
|
|
61
|
+
"email": "teammate@acme.com"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
</ResponseExample>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Retrieve Current Member"
|
|
3
|
+
api: "GET /vendor/members/me"
|
|
4
|
+
description: "Retrieve the authenticated member's profile for the active seller."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Returns the seller member record for the authenticated member, including the member profile, role, and the seller with its address, payment details, and professional details.
|
|
8
|
+
|
|
9
|
+
## Query parameters
|
|
10
|
+
|
|
11
|
+
<ParamField query="fields" type="string">
|
|
12
|
+
Comma-separated fields to include in the response.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
## Response
|
|
16
|
+
|
|
17
|
+
<ResponseField name="seller_member" type="object">
|
|
18
|
+
<Expandable title="properties">
|
|
19
|
+
<ResponseField name="id" type="string">The seller member's ID.</ResponseField>
|
|
20
|
+
<ResponseField name="is_owner" type="boolean">Whether the member owns the seller account.</ResponseField>
|
|
21
|
+
<ResponseField name="member" type="object">The member's profile (first name, last name, email, locale).</ResponseField>
|
|
22
|
+
<ResponseField name="rbac_role" type="object">The member's role for this seller.</ResponseField>
|
|
23
|
+
<ResponseField name="seller" type="object">The active seller, with `address`, `payment_details`, and `professional_details`.</ResponseField>
|
|
24
|
+
</Expandable>
|
|
25
|
+
</ResponseField>
|
|
26
|
+
|
|
27
|
+
<RequestExample>
|
|
28
|
+
```bash cURL
|
|
29
|
+
curl 'http://localhost:9000/vendor/members/me' \
|
|
30
|
+
-H 'Authorization: Bearer <token>' \
|
|
31
|
+
-H 'x-seller-id: <seller_id>'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```ts JS Client
|
|
35
|
+
const { seller_member } = await client.vendor.members.me.query()
|
|
36
|
+
```
|
|
37
|
+
</RequestExample>
|
|
38
|
+
|
|
39
|
+
<ResponseExample>
|
|
40
|
+
```json 200
|
|
41
|
+
{
|
|
42
|
+
"seller_member": {
|
|
43
|
+
"id": "selmem_01HXYZ",
|
|
44
|
+
"is_owner": true,
|
|
45
|
+
"member": { "id": "mem_01HXYZ", "first_name": "Jane", "last_name": "Doe", "email": "owner@acme.com" },
|
|
46
|
+
"rbac_role": { "id": "role_seller_administration", "name": "Administration" },
|
|
47
|
+
"seller": { "id": "sel_01HXYZ", "name": "Acme Store", "status": "open" }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
</ResponseExample>
|