---
title: "CustomerInput"
description: "The input fields to create a customer."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/inputs/customer-input'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/inputs/customer-input.md'
---
# CustomerInput

The input fields to create a customer.

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

## Type Signature

`CustomerInput`

## Input Fields

* `emailMarketingConsent`

  [CustomerEmailMarketingConsentInput](https://developer.shopline.com/docs/admin-graph-ql-api/customers/inputs/customer-email-marketing-consent-input.md)

  Used for customer consent to receive marketing information via email, such as newsletters.

* `addresses`

  [[MailingAddressInput]](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/inputs/mailing-address-input.md)

  Customer Address

* `smsMarketingConsent`

  [CustomerSmsMarketingConsentInput](https://developer.shopline.com/docs/admin-graph-ql-api/customers/inputs/customer-sms-marketing-consent-input.md)

  Used for customer consent/refusal to receive marketing information via SMS.

* `note`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Customer Remarks

* `phone`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Mobile phone number used to contact the customer.

* `id`

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

  Unique Customer Code

* `email`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Email used to contact the customer.

* `taxExemptions`

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

  List of countries and regions where customers are exempt from tax

* `firstName`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  First Name

* `tags`

  [[String]](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Customer Tag List. Could be an array or a comma-separated list. Example values: ["Dev1", "Dev1", "Dev1"], "Dev1, Dev1, Dev1"

* `taxExempt`

  [Boolean](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/boolean.md)

  Whether the customer's orders are tax-exempt.

* `lastName`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Last Name

## Schema Definition

```graphql
input CustomerInput { 
	emailMarketingConsent: CustomerEmailMarketingConsentInput
	addresses: [MailingAddressInput]
	smsMarketingConsent: CustomerSmsMarketingConsentInput
	note: String
	phone: String
	id: ID
	email: String
	taxExemptions: [FreeAreasInput]
	firstName: String
	tags: [String]
	taxExempt: Boolean
	lastName: String 
}
```

## Argument from

* [Mutation](https://developer.shopline.com/docs/admin-graph-ql-api/customers/mutations/customer-create.md).customerCreate

  更新客户的默认地址

* [Mutation](https://developer.shopline.com/docs/admin-graph-ql-api/customers/mutations/customer-update.md).customerUpdate

  按ID更新客户信息

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

