Search.../

getProductPlatformized( )

Developer Preview

Retrieves a product with the provided ID.

Syntax

function getProductPlatformized(_id: string, options: GetProductPlatformizedOptions): Promise<Product>

getProductPlatformized Parameters

NAME
TYPE
DESCRIPTION
_id
string

Requested product ID.

options
Optional
GetProductPlatformizedOptions

Returns

Requested product data.

Return Type:

Promise<
Product
>
NAME
TYPE
DESCRIPTION
_createdDate
Date

Date and time the product was created.

_id
string

Product ID (generated automatically by the catalog).

additionalInfoSections
Array<
AdditionalInfoSection
>

Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.).

brand
string

Product brand. Including a brand name can help improve site and product visibility on search engines.

collectionIds
Array<
string
>

A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs).

convertedPriceData
PriceData

Price data, converted to the currency specified in request header.

costAndProfitData
CostAndProfitData

Cost and profit data.

costRange
NumericPropertyRange

Product cost range. The minimum and maximum costs of all the variants.

customTextFields
Array<
CustomTextField
>

Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI.

description
string

Product description.

discount
Discount

Discount deducted from the product's original price.

inventoryItemId
string

Inventory item ID - ID referencing the inventory system.

lastUpdated
Date

Date and time the product was last updated.

manageVariants
boolean

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
Media

Media items (images, videos etc) associated with this product (writable via Add Product Media endpoint).

name
string

Product name.

Min: 1 character Max: 80 characters

numericId
string

Product’s unique numeric ID (assigned in ascending order). Primarily used for sorting and filtering when crawling all products.

price
PriceData

Deprecated (use priceData instead).

priceData
PriceData

Price data.

pricePerUnitData
PricePerUnitData

Price per unit data.

priceRange
NumericPropertyRange

Product price range. The minimum and maximum prices of all the variants.

productOptions
Array<
ProductOption
>

Options for this product.

productPageUrl
PageUrl

Product page URL for this product (generated automatically by the server).

productType
string

Currently, only creating physical products ( "productType": "physical" ) is supported via the API.

ribbon
string

Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out".

ribbons
Array<
Ribbon
>

Deprecated (use ribbon instead).

seoData
SeoSchema

Custom SEO data for the product.

sku
string

Stock keeping unit. If variant management is enabled, SKUs will be set per variant, and this field will be empty.

slug
string

A friendly URL name (generated automatically by the catalog when a product is created), can be updated.

stock
Stock

Product inventory status (in future this will be writable via Inventory API).

variants
Array<
Variant
>

Product variants, will be provided if the the request was sent with the includeVariants flag.

visible
boolean

Whether the product is visible to site visitors.

weight
number

Product weight. If variant management is enabled, weight will be set per variant, and this field will be empty.

weightRange
NumericPropertyRange

Product weight range. The minimum and maximum weights of all the variants.

Was this helpful?

getProductPlatformized example

Copy Code
1import { products } from 'wix-stores.v2';
2
3 async function getProductPlatformized(id, options) {
4 try {
5 const result = await products.getProductPlatformized(id, options);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13