> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # UpdateProduct # Package: catalogV1 # Namespace: CatalogWriteApi # Method link: https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/update-product.md ## Permission Scopes: Manage Products: SCOPE.DC-STORES.MANAGE-PRODUCTS ## Introduction Updates specified fields in a product. To update a single field across multiple products, use [Bulk Update Product Property](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/bulk-update-product-property.md). --- ## REST API ### Schema ``` Method: updateProduct Description: Updates specified fields in a product. To update a single field across multiple products, use [Bulk Update Product Property](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/bulk-update-product-property.md). URL: https://www.wixapis.com/stores/v1/products/{product.id} Method: PATCH # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: product.id, product Method parameters: param name: product | type: Product | required: true - name: id | type: string | description: Product GUID (generated automatically by the catalog). | required: true - name: name | type: string | description: Product name. Min: 1 character Max: 80 characters - name: slug | type: string | description: A friendly URL name (generated automatically by the catalog when a product is created), can be updated. - name: visible | type: boolean | description: Whether the product is visible to site visitors. - name: productType | type: ProductType | description: Currently, only creating physical products ( `"productType": "physical"` ) is supported via the API. - enum: unspecified_product_type, physical, digital - name: description | type: string | description: Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text). - name: sku | type: string | description: Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty. - name: weight | type: number | description: Product weight. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, weight will be set per variant, and this field will be empty. - name: productDimensions | type: Dimensions | description: Product dimensions (length, width, height of the physical product). If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, dimensions will be set per variant, and this field will be empty. - name: length | type: string | description: Length. Measurement unit is handled at the system level (metric/imperial). - name: width | type: string | description: Width. Measurement unit is handled at the system level (metric/imperial). - name: height | type: string | description: Height. Measurement unit is handled at the system level (metric/imperial). - name: unit | type: DimensionsUnit | description: Unit of measurement for dimensions (length, width, height). - enum: - UNKNOWN_DIMENSIONS_UNIT: - MM: Millimeters. - CM: Centimeters. - M: Meters. - IN: Inches. - FT: Feet. - YD: Yards. - name: packageDimensions | type: Dimensions | description: Package dimensions (length, width, height of the shipping package). If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, dimensions will be set per variant, and this field will be empty. - name: priceData | type: PriceData | description: Price data. - name: price | type: number | description: Product price - name: costAndProfitData | type: CostAndProfitData | description: Cost and profit data. - name: itemCost | type: number | description: Item cost. - name: pricePerUnitData | type: PricePerUnitData | description: Price per unit data. - name: totalQuantity | type: number | description: Total quantity - name: totalMeasurementUnit | type: MeasurementUnit | description: Total measurement unit - enum: UNSPECIFIED, ML, CL, L, CBM, MG, G, KG, MM, CM, M, SQM, OZ, LB, FLOZ, PT, QT, GAL, IN, FT, YD, SQFT - name: baseQuantity | type: number | description: Base quantity - name: baseMeasurementUnit | type: MeasurementUnit | description: Base measurement unit - name: additionalInfoSections | type: array | description: Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). - name: title | type: string | description: Product info section title - name: description | type: string | description: Product info section description - name: manageVariants | type: boolean | description: Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. - name: productOptions | type: array | description: Options for this product. - name: name | type: string | description: Option name. - name: choices | type: array | description: Choices available for this option. - name: value | type: string | description: Choice value. - name: description | type: string | description: Choice description. - name: discount | type: Discount | description: Discount deducted from the product's original price. - name: type | type: DiscountType | description: Discount type: + `"AMOUNT"` + `"PERCENT"` - enum: - UNDEFINED: - NONE: No discount - AMOUNT: Discount by a fixed amount - PERCENT: Discount by a percentage - name: value | type: number | description: Discount value - name: seoData | type: SeoSchema | description: Custom SEO data for the product. - name: tags | type: array | description: SEO tag information. - name: type | type: string | description: SEO tag type. Supported values: `title`, `meta`, `script`, `link`. - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`. - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`. - name: children | type: string | description: SEO tag inner content. For example, ` inner content `. - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. - name: settings | type: Settings | description: SEO general settings. - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. Default: `false` (automatical redirect is enabled). - name: keywords | type: array | description: User-selected keyword terms for a specific page. - name: term | type: string | description: Keyword value. - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword. - name: origin | type: string | description: The source that added the keyword terms to the SEO settings. - name: ribbon | type: string | description: Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out". - name: brand | type: string | description: Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores). Return type: UpdateProductResponse - name: product | type: Product | description: - name: id | type: string | description: Product GUID (generated automatically by the catalog). - name: name | type: string | description: Product name. Min: 1 character Max: 80 characters - name: slug | type: string | description: A friendly URL name (generated automatically by the catalog when a product is created), can be updated. - name: visible | type: boolean | description: Whether the product is visible to site visitors. - name: productType | type: ProductType | description: Currently, only creating physical products ( `"productType": "physical"` ) is supported via the API. - enum: unspecified_product_type, physical, digital - name: description | type: string | description: Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text). - name: sku | type: string | description: Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty. - name: weight | type: number | description: Product weight. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, weight will be set per variant, and this field will be empty. - name: weightRange | type: NumericPropertyRange | description: Product weight range. The minimum and maximum weights of all the variants. - name: minValue | type: number | description: Minimum value. - name: maxValue | type: number | description: Maximum value. - name: productDimensions | type: Dimensions | description: Product dimensions (length, width, height of the physical product). If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, dimensions will be set per variant, and this field will be empty. - name: length | type: string | description: Length. Measurement unit is handled at the system level (metric/imperial). - name: width | type: string | description: Width. Measurement unit is handled at the system level (metric/imperial). - name: height | type: string | description: Height. Measurement unit is handled at the system level (metric/imperial). - name: unit | type: DimensionsUnit | description: Unit of measurement for dimensions (length, width, height). - enum: - UNKNOWN_DIMENSIONS_UNIT: - MM: Millimeters. - CM: Centimeters. - M: Meters. - IN: Inches. - FT: Feet. - YD: Yards. - name: packageDimensions | type: Dimensions | description: Package dimensions (length, width, height of the shipping package). If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, dimensions will be set per variant, and this field will be empty. - name: stock | type: Stock | description: Product inventory status (in future this will be writable via Inventory API). - name: trackInventory | type: boolean | description: Whether inventory is being tracked - name: quantity | type: integer | description: Quantity currently left in inventory - name: inventoryStatus | type: InventoryStatus | description: The current status of the inventory + `IN_STOCK` - In stock + `OUT_OF_STOCK` - Not in stock + `PARTIALLY_OUT_OF_STOCK` - Some of the variants are not in stock - enum: - IN_STOCK: In stock - OUT_OF_STOCK: Not in stock - PARTIALLY_OUT_OF_STOCK: Some of the variants are not in stock - name: priceData | type: PriceData | description: Price data. - name: currency | type: string | description: Product price currency - name: price | type: number | description: Product price - name: discountedPrice | type: number | description: Discounted product price (if no discounted price is set, the product price is returned) - name: formatted | type: FormattedPrice | description: The product price and discounted price, formatted with the currency - name: price | type: string | description: Product price formatted with the currency - name: discountedPrice | type: string | description: Discounted product price formatted with the currency (if no discounted price is set, the product formatted price is returned) - name: pricePerUnit | type: string | description: Price per unit - name: pricePerUnit | type: number | description: Price per unit - name: convertedPriceData | type: PriceData | description: Price data, converted to the currency specified in request header. - name: priceRange | type: NumericPropertyRange | description: Product price range. The minimum and maximum prices of all the variants. - name: costAndProfitData | type: CostAndProfitData | description: Cost and profit data. - name: itemCost | type: number | description: Item cost. - name: formattedItemCost | type: string | description: Item cost formatted with currency symbol. - name: profit | type: number | description: Profit. Calculated by reducing `cost` from `discounted_price`. - name: formattedProfit | type: string | description: Profit formatted with currency symbol. - name: profitMargin | type: number | description: Profit Margin. Calculated by dividing `profit` by `discounted_price`. The result is rounded to 4 decimal places. - name: costRange | type: NumericPropertyRange | description: Product cost range. The minimum and maximum costs of all the variants. - name: pricePerUnitData | type: PricePerUnitData | description: Price per unit data. - name: totalQuantity | type: number | description: Total quantity - name: totalMeasurementUnit | type: MeasurementUnit | description: Total measurement unit - enum: UNSPECIFIED, ML, CL, L, CBM, MG, G, KG, MM, CM, M, SQM, OZ, LB, FLOZ, PT, QT, GAL, IN, FT, YD, SQFT - name: baseQuantity | type: number | description: Base quantity - name: baseMeasurementUnit | type: MeasurementUnit | description: Base measurement unit - name: additionalInfoSections | type: array | description: Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). - name: title | type: string | description: Product info section title - name: description | type: string | description: Product info section description - name: media | type: Media | description: Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint). - name: mainMedia | type: MediaItem | description: Primary media (image, video etc) associated with this product. - ONE-OF: - name: image | type: MediaItemUrlAndSize | description: Image data (URL, size). - name: url | type: string | description: Media item URL. - name: width | type: integer | description: Media item width. - name: height | type: integer | description: Media item height. - name: format | type: string | description: Media format (mp4, png, etc.). - name: altText | type: string | description: Alt text. This text will be shown in case the image is not available. - name: video | type: MediaItemVideo | description: Video data (URL, size). - name: files | type: array | description: Data (URL, size) about each resolution for which this video is available. - name: stillFrameMediaId | type: string | description: GUID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`. - name: thumbnail | type: MediaItemUrlAndSize | description: Media item thumbnail details. - name: mediaType | type: MediaItemType | description: Media item type (image, video, etc.). - enum: - unspecified_media_item_type: - image: Image media type. - video: Video media type. - audio: Audio media type. - document: Document media type. - zip: Zip media type. - name: title | type: string | description: Media item title. - name: id | type: string | description: Media GUID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). - name: items | type: array | description: Media (images, videos etc) associated with this product. - name: customTextFields | type: array | description: Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI. - name: title | type: string | description: Text box title - name: maxLength | type: integer | description: Text box input max length - name: mandatory | type: boolean | description: Whether this text box is mandatory - name: manageVariants | type: boolean | description: Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. - name: productOptions | type: array | description: Options for this product. - name: optionType | type: OptionType | description: Option type. - enum: - unspecified_option_type: Unspecified option type. - drop_down: Drop down. - color: Color. - name: name | type: string | description: Option name. - name: choices | type: array | description: Choices available for this option. - name: value | type: string | description: Choice value. - name: description | type: string | description: Choice description. - name: media | type: Media | description: Media items (images, videos) associated with this choice - name: inStock | type: boolean | description: Based on the customer’s choices, which (if any) variants that include the selected choices are in stock - name: visible | type: boolean | description: Based on the customer’s choices, which (if any) variants that include the selected choices are visible - name: productPageUrl | type: PageUrl | description: Product page URL for this product (generated automatically by the server). - name: base | type: string | description: Base URL. For premium sites, this is the domain. For free sites, this is the site URL (e.g mysite.wixsite.com/mysite). - name: path | type: string | description: Path to the product page - e.g /product-page/a-product. - name: numericId | type: number | description: Product’s unique numeric GUID (assigned in ascending order). Primarily used for sorting and filtering when crawling all products. - name: inventoryItemId | type: string | description: Inventory item GUID - GUID referencing the inventory system. - name: discount | type: Discount | description: Discount deducted from the product's original price. - name: type | type: DiscountType | description: Discount type: + `"AMOUNT"` + `"PERCENT"` - enum: - UNDEFINED: - NONE: No discount - AMOUNT: Discount by a fixed amount - PERCENT: Discount by a percentage - name: value | type: number | description: Discount value - name: collectionIds | type: array | description: A list of all collection GUIDs that this product is included in (writable via the Catalog > Collection APIs). - name: variants | type: array | description: Product variants, will be provided if the request was sent with the `includeVariants: true`. Max: 1,000 variants - name: id | type: string | description: Requested Variant GUID - name: choices | type: object | description: Specific choices within a selection, as option-choice key-value pairs - name: variant | type: VariantDataWithNoStock | description: - name: priceData | type: PriceData | description: Variant price. - name: convertedPriceData | type: PriceData | description: Variant price data, converted to currency requested in header. - name: costAndProfitData | type: CostAndProfitData | description: Cost and profit data. - name: weight | type: number | description: Variant weight. - name: sku | type: string | description: Variant SKU (stock keeping unit). - name: visible | type: boolean | description: Whether the variant is visible to customers. - name: productDimensions | type: Dimensions | description: Product dimensions (length, width, height of the physical product). - name: packageDimensions | type: Dimensions | description: Package dimensions (length, width, height of the shipping package). - name: stock | type: VariantStock | description: Variant inventory status. - name: trackQuantity | type: boolean | description: Whether inventory is being tracked. - name: quantity | type: integer | description: Quantity currently left in inventory. - name: inStock | type: boolean | description: Whether the product is currently in stock (relevant only when tracking manually). - name: lastUpdated | type: string | description: Date and time the product was last updated. - name: createdDate | type: string | description: Date and time the product was created. - name: seoData | type: SeoSchema | description: Custom SEO data for the product. - name: tags | type: array | description: SEO tag information. - name: type | type: string | description: SEO tag type. Supported values: `title`, `meta`, `script`, `link`. - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`. - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`. - name: children | type: string | description: SEO tag inner content. For example, ` inner content `. - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. - name: settings | type: Settings | description: SEO general settings. - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. Default: `false` (automatical redirect is enabled). - name: keywords | type: array | description: User-selected keyword terms for a specific page. - name: term | type: string | description: Keyword value. - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword. - name: origin | type: string | description: The source that added the keyword terms to the SEO settings. - name: ribbon | type: string | description: Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out". - name: brand | type: string | description: Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores). ``` ### Examples ### UpdateProduct ```curl ~~~cURL curl -X PATCH \ 'https://www.wixapis.com/stores/v1/products/83f41911-5375-4ede-aafa-68f8b6dee9e2' \ --data-binary '{ "product": { "name": "T-shirt", "productType": "physical", "priceData": { "price": 12.5 }, "description": "nice summer t-shirt", "sku": "123df", "visible": false, "weight": 0.2, "ribbon": "Sold Out", "brand": "Nice", "discount": { "type": "AMOUNT", "value": 2 }, "productOptions": [ { "name": "Size", "choices": [ { "value": "S", "description": "Small" } ] } ] } }' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.catalogV1.CatalogWriteApi.updateProduct(_id, product) Description: Updates specified fields in a product. To update a single field across multiple products, use [Bulk Update Product Property](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/bulk-update-product-property.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: _id, product Method parameters: param name: _id | type: string | description: Product GUID (generated automatically by the catalog). | required: true param name: product | type: Product | required: true - name: name | type: string | description: Product name. Min: 1 character Max: 80 characters - name: slug | type: string | description: A friendly URL name (generated automatically by the catalog when a product is created), can be updated. - name: visible | type: boolean | description: Whether the product is visible to site visitors. - name: productType | type: ProductType | description: Currently, only creating physical products ( `"productType": "physical"` ) is supported via the API. - enum: unspecified_product_type, physical, digital - name: description | type: string | description: Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text). - name: sku | type: string | description: Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty. - name: weight | type: number | description: Product weight. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, weight will be set per variant, and this field will be empty. - name: productDimensions | type: Dimensions | description: Product dimensions (length, width, height of the physical product). If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, dimensions will be set per variant, and this field will be empty. - name: length | type: string | description: Length. Measurement unit is handled at the system level (metric/imperial). - name: width | type: string | description: Width. Measurement unit is handled at the system level (metric/imperial). - name: height | type: string | description: Height. Measurement unit is handled at the system level (metric/imperial). - name: unit | type: DimensionsUnit | description: Unit of measurement for dimensions (length, width, height). - enum: - UNKNOWN_DIMENSIONS_UNIT: - MM: Millimeters. - CM: Centimeters. - M: Meters. - IN: Inches. - FT: Feet. - YD: Yards. - name: packageDimensions | type: Dimensions | description: Package dimensions (length, width, height of the shipping package). If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, dimensions will be set per variant, and this field will be empty. - name: priceData | type: PriceData | description: Price data. - name: price | type: number | description: Product price - name: costAndProfitData | type: CostAndProfitData | description: Cost and profit data. - name: itemCost | type: number | description: Item cost. - name: pricePerUnitData | type: PricePerUnitData | description: Price per unit data. - name: totalQuantity | type: number | description: Total quantity - name: totalMeasurementUnit | type: MeasurementUnit | description: Total measurement unit - enum: UNSPECIFIED, ML, CL, L, CBM, MG, G, KG, MM, CM, M, SQM, OZ, LB, FLOZ, PT, QT, GAL, IN, FT, YD, SQFT - name: baseQuantity | type: number | description: Base quantity - name: baseMeasurementUnit | type: MeasurementUnit | description: Base measurement unit - name: additionalInfoSections | type: array | description: Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). - name: title | type: string | description: Product info section title - name: description | type: string | description: Product info section description - name: manageVariants | type: boolean | description: Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. - name: productOptions | type: array | description: Options for this product. - name: name | type: string | description: Option name. - name: choices | type: array | description: Choices available for this option. - name: value | type: string | description: Choice value. - name: description | type: string | description: Choice description. - name: discount | type: Discount | description: Discount deducted from the product's original price. - name: type | type: DiscountType | description: Discount type: + `"AMOUNT"` + `"PERCENT"` - enum: - UNDEFINED: - NONE: No discount - AMOUNT: Discount by a fixed amount - PERCENT: Discount by a percentage - name: value | type: number | description: Discount value - name: seoData | type: SeoSchema | description: Custom SEO data for the product. - name: tags | type: array | description: SEO tag information. - name: type | type: string | description: SEO tag type. Supported values: `title`, `meta`, `script`, `link`. - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`. - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`. - name: children | type: string | description: SEO tag inner content. For example, ` inner content `. - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. - name: settings | type: Settings | description: SEO general settings. - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. Default: `false` (automatical redirect is enabled). - name: keywords | type: array | description: User-selected keyword terms for a specific page. - name: term | type: string | description: Keyword value. - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword. - name: origin | type: string | description: The source that added the keyword terms to the SEO settings. - name: ribbon | type: string | description: Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out". - name: brand | type: string | description: Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores). Return type: PROMISE - name: product | type: Product | description: - name: _id | type: string | description: Product GUID (generated automatically by the catalog). - name: name | type: string | description: Product name. Min: 1 character Max: 80 characters - name: slug | type: string | description: A friendly URL name (generated automatically by the catalog when a product is created), can be updated. - name: visible | type: boolean | description: Whether the product is visible to site visitors. - name: productType | type: ProductType | description: Currently, only creating physical products ( `"productType": "physical"` ) is supported via the API. - enum: unspecified_product_type, physical, digital - name: description | type: string | description: Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text). - name: sku | type: string | description: Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty. - name: weight | type: number | description: Product weight. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, weight will be set per variant, and this field will be empty. - name: weightRange | type: NumericPropertyRange | description: Product weight range. The minimum and maximum weights of all the variants. - name: minValue | type: number | description: Minimum value. - name: maxValue | type: number | description: Maximum value. - name: productDimensions | type: Dimensions | description: Product dimensions (length, width, height of the physical product). If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, dimensions will be set per variant, and this field will be empty. - name: length | type: string | description: Length. Measurement unit is handled at the system level (metric/imperial). - name: width | type: string | description: Width. Measurement unit is handled at the system level (metric/imperial). - name: height | type: string | description: Height. Measurement unit is handled at the system level (metric/imperial). - name: unit | type: DimensionsUnit | description: Unit of measurement for dimensions (length, width, height). - enum: - UNKNOWN_DIMENSIONS_UNIT: - MM: Millimeters. - CM: Centimeters. - M: Meters. - IN: Inches. - FT: Feet. - YD: Yards. - name: packageDimensions | type: Dimensions | description: Package dimensions (length, width, height of the shipping package). If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, dimensions will be set per variant, and this field will be empty. - name: stock | type: Stock | description: Product inventory status (in future this will be writable via Inventory API). - name: trackInventory | type: boolean | description: Whether inventory is being tracked - name: quantity | type: integer | description: Quantity currently left in inventory - name: inventoryStatus | type: InventoryStatus | description: The current status of the inventory + `IN_STOCK` - In stock + `OUT_OF_STOCK` - Not in stock + `PARTIALLY_OUT_OF_STOCK` - Some of the variants are not in stock - enum: - IN_STOCK: In stock - OUT_OF_STOCK: Not in stock - PARTIALLY_OUT_OF_STOCK: Some of the variants are not in stock - name: priceData | type: PriceData | description: Price data. - name: currency | type: string | description: Product price currency - name: price | type: number | description: Product price - name: discountedPrice | type: number | description: Discounted product price (if no discounted price is set, the product price is returned) - name: formatted | type: FormattedPrice | description: The product price and discounted price, formatted with the currency - name: price | type: string | description: Product price formatted with the currency - name: discountedPrice | type: string | description: Discounted product price formatted with the currency (if no discounted price is set, the product formatted price is returned) - name: pricePerUnit | type: string | description: Price per unit - name: pricePerUnit | type: number | description: Price per unit - name: convertedPriceData | type: PriceData | description: Price data, converted to the currency specified in request header. - name: priceRange | type: NumericPropertyRange | description: Product price range. The minimum and maximum prices of all the variants. - name: costAndProfitData | type: CostAndProfitData | description: Cost and profit data. - name: itemCost | type: number | description: Item cost. - name: formattedItemCost | type: string | description: Item cost formatted with currency symbol. - name: profit | type: number | description: Profit. Calculated by reducing `cost` from `discounted_price`. - name: formattedProfit | type: string | description: Profit formatted with currency symbol. - name: profitMargin | type: number | description: Profit Margin. Calculated by dividing `profit` by `discounted_price`. The result is rounded to 4 decimal places. - name: costRange | type: NumericPropertyRange | description: Product cost range. The minimum and maximum costs of all the variants. - name: pricePerUnitData | type: PricePerUnitData | description: Price per unit data. - name: totalQuantity | type: number | description: Total quantity - name: totalMeasurementUnit | type: MeasurementUnit | description: Total measurement unit - enum: UNSPECIFIED, ML, CL, L, CBM, MG, G, KG, MM, CM, M, SQM, OZ, LB, FLOZ, PT, QT, GAL, IN, FT, YD, SQFT - name: baseQuantity | type: number | description: Base quantity - name: baseMeasurementUnit | type: MeasurementUnit | description: Base measurement unit - name: additionalInfoSections | type: array | description: Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). - name: title | type: string | description: Product info section title - name: description | type: string | description: Product info section description - name: media | type: Media | description: Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint). - name: mainMedia | type: MediaItem | description: Primary media (image, video etc) associated with this product. - ONE-OF: - name: image | type: MediaItemUrlAndSize | description: Image data (URL, size). - name: url | type: string | description: Media item URL. - name: width | type: integer | description: Media item width. - name: height | type: integer | description: Media item height. - name: format | type: string | description: Media format (mp4, png, etc.). - name: altText | type: string | description: Alt text. This text will be shown in case the image is not available. - name: video | type: MediaItemVideo | description: Video data (URL, size). - name: files | type: array | description: Data (URL, size) about each resolution for which this video is available. - name: stillFrameMediaId | type: string | description: GUID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`. - name: thumbnail | type: MediaItemUrlAndSize | description: Media item thumbnail details. - name: mediaType | type: MediaItemType | description: Media item type (image, video, etc.). - enum: - unspecified_media_item_type: - image: Image media type. - video: Video media type. - audio: Audio media type. - document: Document media type. - zip: Zip media type. - name: title | type: string | description: Media item title. - name: _id | type: string | description: Media GUID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). - name: items | type: array | description: Media (images, videos etc) associated with this product. - name: customTextFields | type: array | description: Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI. - name: title | type: string | description: Text box title - name: maxLength | type: integer | description: Text box input max length - name: mandatory | type: boolean | description: Whether this text box is mandatory - name: manageVariants | type: boolean | description: Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. - name: productOptions | type: array | description: Options for this product. - name: optionType | type: OptionType | description: Option type. - enum: - unspecified_option_type: Unspecified option type. - drop_down: Drop down. - color: Color. - name: name | type: string | description: Option name. - name: choices | type: array | description: Choices available for this option. - name: value | type: string | description: Choice value. - name: description | type: string | description: Choice description. - name: media | type: Media | description: Media items (images, videos) associated with this choice - name: inStock | type: boolean | description: Based on the customer’s choices, which (if any) variants that include the selected choices are in stock - name: visible | type: boolean | description: Based on the customer’s choices, which (if any) variants that include the selected choices are visible - name: productPageUrl | type: PageUrl | description: Product page URL for this product (generated automatically by the server). - name: base | type: string | description: Base URL. For premium sites, this is the domain. For free sites, this is the site URL (e.g mysite.wixsite.com/mysite). - name: path | type: string | description: Path to the product page - e.g /product-page/a-product. - name: numericId | type: number | description: Product’s unique numeric GUID (assigned in ascending order). Primarily used for sorting and filtering when crawling all products. - name: inventoryItemId | type: string | description: Inventory item GUID - GUID referencing the inventory system. - name: discount | type: Discount | description: Discount deducted from the product's original price. - name: type | type: DiscountType | description: Discount type: + `"AMOUNT"` + `"PERCENT"` - enum: - UNDEFINED: - NONE: No discount - AMOUNT: Discount by a fixed amount - PERCENT: Discount by a percentage - name: value | type: number | description: Discount value - name: collectionIds | type: array | description: A list of all collection GUIDs that this product is included in (writable via the Catalog > Collection APIs). - name: variants | type: array | description: Product variants, will be provided if the request was sent with the `includeVariants: true`. Max: 1,000 variants - name: _id | type: string | description: Requested Variant GUID - name: choices | type: object | description: Specific choices within a selection, as option-choice key-value pairs - name: variant | type: VariantDataWithNoStock | description: - name: priceData | type: PriceData | description: Variant price. - name: convertedPriceData | type: PriceData | description: Variant price data, converted to currency requested in header. - name: costAndProfitData | type: CostAndProfitData | description: Cost and profit data. - name: weight | type: number | description: Variant weight. - name: sku | type: string | description: Variant SKU (stock keeping unit). - name: visible | type: boolean | description: Whether the variant is visible to customers. - name: productDimensions | type: Dimensions | description: Product dimensions (length, width, height of the physical product). - name: packageDimensions | type: Dimensions | description: Package dimensions (length, width, height of the shipping package). - name: stock | type: VariantStock | description: Variant inventory status. - name: trackQuantity | type: boolean | description: Whether inventory is being tracked. - name: quantity | type: integer | description: Quantity currently left in inventory. - name: inStock | type: boolean | description: Whether the product is currently in stock (relevant only when tracking manually). - name: lastUpdated | type: Date | description: Date and time the product was last updated. - name: _createdDate | type: Date | description: Date and time the product was created. - name: seoData | type: SeoSchema | description: Custom SEO data for the product. - name: tags | type: array | description: SEO tag information. - name: type | type: string | description: SEO tag type. Supported values: `title`, `meta`, `script`, `link`. - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`. - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`. - name: children | type: string | description: SEO tag inner content. For example, ` inner content `. - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. - name: settings | type: Settings | description: SEO general settings. - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. Default: `false` (automatical redirect is enabled). - name: keywords | type: array | description: User-selected keyword terms for a specific page. - name: term | type: string | description: Keyword value. - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword. - name: origin | type: string | description: The source that added the keyword terms to the SEO settings. - name: ribbon | type: string | description: Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out". - name: brand | type: string | description: Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores). ``` ### Examples ### Update product ```javascript import { products } from "@wix/stores"; const productId = "83f41911-5375-4ede-aafa-68f8b6dee9e2"; const product = { name: "T-shirt", productType: "physical", priceData: { price: 12.5 }, description: "nice summer t-shirt", sku: "123df", visible: false, weight: 0.2, ribbon: "Sold Out", brand: "Nice", discount: { type: "AMOUNT", value: 2 }, productOptions: [ { name: "Size", choices: [ { value: "S", description: "Small", inStock: true, visible: true }, { value: "M", description: "Medium", inStock: true, visible: true } ] } ] }; async function updateProduct() { const response = await products.updateProduct(productId, product); } /* Promise resolves to: * { * "_id": "83f41911-5375-4ede-aafa-68f8b6dee9e2", * "name": "T-shirt", * "slug": "t-shirt", * "visible": false, * "productType": "physical", * "description": "nice summer t-shirt", * "sku": "123df", * "weight": 0.2, * "ribbon": "Sold Out", * "brand": "Nice", * "discount": { * "type": "AMOUNT", * "value": 2 * }, * "priceData": { * "currency": "USD", * "price": 12.5, * "formatted": { * "price": "$12.50", * "discountedPrice": "$10.50" * } * }, * "productOptions": [ * { * "name": "Size", * "choices": [ * { * "value": "S", * "description": "Small", * "inStock": true, * "visible": true * }, * { * "value": "M", * "description": "Medium", * "inStock": true, * "visible": true * } * ] * } * ] * } */ ``` ### updateProduct (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { products } from '@wix/stores'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { products }, // Include the auth strategy and host as relevant }); async function updateProduct(_id,product) { const response = await myWixClient.products.updateProduct(_id,product); }; ``` ---