---
title: "customerReplaceTaxExemptions"
description: "替换客户的免税信息"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/customers/mutations/customer-replace-tax-exemptions'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/customers/mutations/customer-replace-tax-exemptions.md'
---
# customerReplaceTaxExemptions

替换客户的免税信息

- **Required Scopes:** `write_customers`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Mutation

## Type Signature

`CustomerReplaceTaxExemptionsPayload`

## Required Permissions

* `write_customers`

接口访问需要令牌，具体如何获取令牌请参考：[身份认证](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md)

## Arguments

* `customerId`

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

  客户ID

* `taxExemptions`

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

  适用于客户的免税区域

## Returns

* `customer`

  [Customer](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/customers/objects/customer.md)

  更新的客户信息

* `userErrors`

  [[BusinessCustomerUserError]](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/customers/objects/business-customer-user-error.md)

  错误信息

## Code Example

```graphql
mutation customerReplaceTaxExemptions($customerId: ID! $taxExemptions: [FreeAreasInput!] ) {
	customerReplaceTaxExemptions(customerId: $customerId, taxExemptions: $taxExemptions ) 
		 {
			# CustomerReplaceTaxExemptionsPayload fields
		}
		
	}

```

## Variables

```json
{
  "customerId": {},
  "taxExemptions": {
    "countryCode": {},
    "provinceGCodeList": {}
  }
}
```

## 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)。

