Types > Customer
Commerce APITypesCustomer
Customer

Description

Topic: Customers

Fields

accepts_marketing: Boolean!

Indicates whether the customer has consented to be sent marketing material via email

Example: false


addresses: [Address!]!

Saved customer addresses for quick form filling


created_at: String!

The date and time when the customer information was created

Example: "2014-09-04T12:23:34Z"

Timestamp (RFC 3339)


customer_group: CustomerGroup

Customer group customer belongs to

Expandable

Permission bit: "customer_groups.read"


default_billing_address_id: String!

Default billing address identifier

Example: "ad_EQzGqWoY"


default_payment_source_id: String

Default stripe payment source id

Example: "card_1Ak9dNDVveQRXOWz2ZFPd73P"


default_shipping_address_id: String!

Default shipping address identifier

Example: "ad_EQzGqWoY"


deleted_at: String

The date and time when the customer was deleted

Example: "2014-09-04T12:23:34Z"

Timestamp (RFC 3339)


display_name: String!

The name to display for other customers (under product reviews and such)

Example: "John S."


email: String!

The email address of the customer

Example: "bob.norman@hostmail.com"


email_confirmation_token: String!

Token used for email confirmation

Example: "apHCJBl7L1OmC57nj3k6v02m"


email_confirmed: Boolean!

Whether customer's email address was confirmed or not

Example: false


id: String!

Unique customer identifier. See also: Unique Identifiers

Example: "cu_EQzGqWoY"


inferred_locale: String!

Inferred locale of the customer, free-form string in Accept-Language HTTP header format

Example: "fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5"


is_disposable_email: Boolean!

Whether or not customer's email address looks suspicious (fraud)

Example: false


is_guest: Boolean!

Whether or not customer is a guest or not (has password)

Example: false


language: InfoLanguage

Preferred language of the customer

Expandable


last_order: Order

Last order customer reserved

Expandable

Permission bit: "orders.read"


metadata: [KeyValue!]!


mobile: String!

The mobile phone number of the customer (used for notifications)

Example: "45634634562"


mobile_notifications: Boolean!

Whether to notify customer via mobile phone or not

Example: false


name: String!

Name of the customer

Example: "John Smith"


oauth_provider: CustomerOAuthProviderKind

OAuth2 provider used for registering this account


oauth_providers: [CustomerOAuthProviderKind!]!

OAuth2 providers enabled for this customer if any


order_count: Int!

The number of orders associated with this customer

Example: 0


password_defined: Boolean!

Whether customer has password defined

Example: true


preferred_currency: String!

Currency customer prefers

Example: "USD"


reminder_messages: Boolean!

Indicates whether the customer desires to get reminder emails

Example: false


stripe_customer_id: String

Stripe customer id, if customer is registered with stripe gateway

Example: "cus_DiAslTjCjpW8JW"


sub_access_token: String!

Token that gives access to subscription fields

Example: "550e8400-e29b-41d4-a716-446655440000"


tags: [String!]!

Customer tags (can be used for organization)


tax_exempt: Boolean!

Marks customer as tax-exempt, customer will not be charged any taxes

Example: false


timezone: String!

Name of the time zone the customer is in

Example: "(GMT-05:00) Eastern Time"


total_spent: Int!

The total amount of money that the customer has spent at the shop

Example: 0.0


updated_at: String!

The date and time when the customer information was updated

Example: "2014-09-04T12:23:34Z"

Timestamp (RFC 3339)


webauthn_keys: [WebauthnKey!]!

Webauthn keys if any


Used By

Mutations

customersCreate, customersModify

Queries

customers

Types

CustomerExpandableItems, CustomerFavorite, CustomerInventory, CustomerPage, CustomerSearchResult, Order, OrderHistory, ProductQuestion, ProductQuestionAnswer, ProductReview, Reservation, ReturnHistory, Subscription, UnifiedSearchResult, VariantInventoryLog

Preview (typescript)

Loading schema