---
title: "productUpdate"
description: >
  更新店铺中的单个商品。  :::tip{title="提示"} 商品的 SEO 信息通过元字段（Metafield）进行管理。具体操作方式，可参考 [通过 Metafield 的 Open API 编辑资源页面 SEO 信息](https://developer.shopline.com/zh-hans-cn/docs/apps/shopline-metafields/overview/#metafields-seo%E6%95%B0%E6%8D%AE%E4%BC%98%E5%8C%96)。  通过本接口更新商品时，不会对商品的 SEO 信息做更新。 :::
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/products-and-collections/mutations/product-update'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/products-and-collections/mutations/product-update.md'
---
# productUpdate

更新店铺中的单个商品。

:::tip{title="提示"}
商品的 SEO 信息通过元字段（Metafield）进行管理。具体操作方式，可参考 [通过 Metafield 的 Open API 编辑资源页面 SEO 信息](https://developer.shopline.com/zh-hans-cn/docs/apps/shopline-metafields/overview/#metafields-seo%E6%95%B0%E6%8D%AE%E4%BC%98%E5%8C%96)。

通过本接口更新商品时，不会对商品的 SEO 信息做更新。
:::

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Mutation

## Arguments

* `input`

  [ProductInput!](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/products-and-collections/inputs/product-input.md)

  更新商品所需的商品字段信息。

* `media`

  [[CreateMediaInput!]](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common-objects/inputs/create-media-input.md)

  更新商品所需的媒体字段信息。

## Returns

* `product`

  [Product](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/products-and-collections/objects/product.md)

  更新后的产品实例

* `userErrors`

  [[UserError]!](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common-objects/objects/user-error.md)

  执行突变时发生的错误列表。

## Error Handling

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

