Home > @poq/sdk-sfcc > ProductsClient > getProductsByID
To access single products resource, you construct a URL using the template shown below. This template requires you to specify an Id (typically a SKU) for a product. In response, the server returns a corresponding Product document, provided the product is online and assigned to site catalog. The document contains variation attributes (including values) and the variant matrix; this data is provided for both the master and for the variant.
Signature:
getProductsByID(id: string, expand?: Array<string>, inventoryIds?: Array<string>, currency?: string, locale?: string, allImages?: boolean, options?: RequestOptions): Promise<PoqResponse<Product>>;
Parameter | Type | Description |
---|---|---|
id | string | The id of the requested product. |
expand | Array<string> | (Optional) |
inventoryIds | Array<string> | (Optional) |
currency | string | (Optional) |
locale | string | (Optional) |
allImages | boolean | (Optional) |
options | RequestOptions | (Optional) Override http request option. |
Returns:
Promise<PoqResponse<Product>>