writeProxyUpdateProductPlatformized( )
Updates specified fields in a product.
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Syntax
function writeProxyUpdateProductPlatformized(_id: string, product: WriteProxyUpdateProductPlatformizedProduct): Promise<Product>
writeProxyUpdateProductPlatformized Parameters
NAME
TYPE
DESCRIPTION
Product ID (generated automatically by the catalog).
Returns
Return Type:
NAME
TYPE
DESCRIPTION
Date and time the product was created.
Product ID (generated automatically by the catalog).
Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.).
Product brand. Including a brand name can help improve site and product visibility on search engines.
A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs).
Price data, converted to the currency specified in request header.
Cost and profit data.
Product cost range. The minimum and maximum costs of all the variants.
Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI.
Product description.
Discount deducted from the product's original price.
Inventory item ID - ID referencing the inventory system.
Date and time the product was last updated.
Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. Once set to true
, can be reset to false
only if no variants exist. You cannot set manageVariants
to true
if more than 300 variants are defined.
Media items (images, videos etc) associated with this product (writable via Add Product Media endpoint).
Product name.
Min: 1 character Max: 80 characters
Product’s unique numeric ID (assigned in ascending order). Primarily used for sorting and filtering when crawling all products.
Deprecated (use priceData
instead).
Price data.
Price per unit data.
Product price range. The minimum and maximum prices of all the variants.
Options for this product.
Product page URL for this product (generated automatically by the server).
Currently, only creating physical products ( "productType": "physical"
) is supported via the API.
Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out".
Deprecated (use ribbon
instead).
Custom SEO data for the product.
Stock keeping unit. If variant management is enabled, SKUs will be set per variant, and this field will be empty.
A friendly URL name (generated automatically by the catalog when a product is created), can be updated.
Product inventory status (in future this will be writable via Inventory API).
Product variants, will be provided if the the request was sent with the includeVariants flag.
Whether the product is visible to site visitors.
Product weight. If variant management is enabled, weight will be set per variant, and this field will be empty.
Product weight range. The minimum and maximum weights of all the variants.
Was this helpful?
writeProxyUpdateProductPlatformized example
1import { products } from 'wix-stores.v2';23 async function writeProxyUpdateProductPlatformized(id, product) {4 try {5 const result = await products.writeProxyUpdateProductPlatformized(id, product);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13