为客户增加免税-customerAddTaxExemptions mutation

为客户增加免税。

所需的访问

write_customers 访问范围。


在本页面


互动范例

这是一个示例mutation查询。

变异customerAddTaxExemptions $ customerId ID $ taxExemptions [ TaxExemption !]!){ customerAddTaxExemptions customerId $ customerId taxExemptions $ taxExemptions {
  1. <font style="color:#1F61A0;">客户</font><font style="color:#555555;">{</font>
  2. <font style="color:#1F61A0;">ID</font>
  3. <font style="color:#555555;">}</font>
  4. <font style="color:#1F61A0;">userErrors </font><font style="color:#555555;">{</font>
  5. <font style="color:#1F61A0;">场地</font>
  6. <font style="color:#1F61A0;">信息</font>
  7. <font style="color:#555555;">}</font>
} } { “ customerId” “ Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE =” “ taxExemptions” [
  1. <font style="color:#D64292;">“占位符”</font>
] }

参数

参数 描述
customerId
[ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)

必需的
要更新的客户的ID。
taxExemptions
[[TaxExemption!]!](https://shopify.dev/docs/admin-api/graphql/reference/customers/taxexemption)

必需的
要添加到客户的免税清单。

返回字段

  • customer[Customer](https://shopify.dev/docs/admin-api/graphql/reference/customers/customer)
    更新的客户。
  • userErrors[[UserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/usererror)
    执行突变时发生的错误列表。