import { PriceSelectionParams } from "../../../../types/price-selection"; /** * @oas [get] /store/products/{id} * operationId: GetProductsProduct * summary: Get a Product * description: | * Retrieve a Product's details. For accurate and correct pricing of the product based on the customer's context, it's highly recommended to pass fields such as * `region_id`, `currency_code`, and `cart_id` when available. * * Passing `sales_channel_id` ensures retrieving only products available in the current sales channel. * You can alternatively use a publishable API key in the request header instead of passing a `sales_channel_id`. * externalDocs: * description: "How to pass product pricing parameters" * url: "https://docs.medusajs.com/modules/products/storefront/show-products#product-pricing-parameters" * parameters: * - (path) id=* {string} The ID of the Product. * - (query) sales_channel_id {string} The ID of the sales channel the customer is viewing the product from. * - (query) cart_id {string} The ID of the cart. This is useful for accurate pricing based on the cart's context. * - (query) region_id {string} The ID of the region. This is useful for accurate pricing based on the selected region. * - (query) expand {string} Comma-separated relations that should be expanded in the returned product. * - (query) fields {string} Comma-separated fields that should be included in the returned product. * - in: query * name: currency_code * style: form * explode: false * description: A 3 character ISO currency code. This is useful for accurate pricing based on the selected currency. * schema: * type: string * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes * description: See a list of codes. * x-codegen: * method: retrieve * queryParams: StoreGetProductsProductParams * x-codeSamples: * - lang: JavaScript * label: JS Client * source: | * import Medusa from "@medusajs/medusa-js" * const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) * medusa.products.retrieve(productId) * .then(({ product }) => { * console.log(product.id); * }); * - lang: Shell * label: cURL * source: | * curl '{backend_url}/store/products/{id}' * tags: * - Products * responses: * 200: * description: OK * content: * application/json: * schema: * $ref: "#/components/schemas/StoreProductsRes" * "400": * $ref: "#/components/responses/400_error" * "404": * $ref: "#/components/responses/not_found_error" * "409": * $ref: "#/components/responses/invalid_state_error" * "422": * $ref: "#/components/responses/invalid_request_error" * "500": * $ref: "#/components/responses/500_error" */ declare const _default: (req: any, res: any) => Promise; export default _default; export declare class StoreGetProductsProductParams extends PriceSelectionParams { sales_channel_id?: string; }