---
title: "productRecommendations"
description: "推荐商品查询"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/queries/product-recommendations'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/queries/product-recommendations.md'
---
# productRecommendations

推荐商品查询

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`[Product]`

## Arguments

* `id`

  [ID!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/id.md)

  商品ID

## Returns

* `availableForSale`

  [Boolean](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/boolean.md)

  表明是否至少有一个变体可售

* `~~brand~~`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  商品品牌 [Deprecated]

* `collections`

  [CollectionConnection](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/objects/collection-connection.md)

  商品所挂载的分类

* `compareAtPriceRange`

  [ProductPriceRange](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/objects/product-price-range.md)

  原价区间

* `createdAt`

  [Date](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/date.md)

  创建时间

* `descriptionHtml`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  商品描述

* `featuredImage`

  [Image](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/image.md)

  商品首图

* `handle`

  [String!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  商品handle

* `id`

  [ID!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/id.md)

  商品ID

* `images`

  [[Image]](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/image.md)

  商品主图

* `onlineStoreUrl`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  在线商店URL

* `options`

  [[ProductOption]](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/objects/product-option.md)

  变体选项

* `priceRange`

  [ProductPriceRange](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/objects/product-price-range.md)

  售价区间

* `~~status~~`

  [ProductStatus](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/enums/product-status.md)

  商品状态 [Deprecated]

* `templatePath`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  模版路径

* `title`

  [String!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  商品标题

* `totalInventory`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/int.md)

  库存总数

* `totalVariants`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/int.md)

  变体数量

* `updatedAt`

  [Date](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/date.md)

  更新时间

* `variants`

  [[ProductVariant]](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/objects/product-variant.md)

  变体信息

* `vendor`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  商品厂商

## Code Example

```graphql
 {
	productRecommendations(id ) 
		 {
			# Product fields
		}
}
```

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes)。

