Customer
A customer profile including name, contact information, order history, and preferences.
Type Definition
type Customer {
id: Int
customerNumber: String
name: String
address: Address
tags: [String]
hasAccess: Boolean
username: String
firstName: String
lastName: String
language: Locale
currency: Currency
acceptsMarketing: Boolean
consents: [ConsentRecord]!
orderCount: Int
orderTotal: Float
refundCount: Int
refundTotal: Float
firstOrderDate: String
lastOrderDate: String
audiences: [String]
loyaltyDiscountProgress: LoyaltyDiscountProgress
metafields: [Metafield]!
metafield: Metafield
}Fields
Relationships
The Customer type represents a customer profile and contains references to several related types. The address field links to address information, while language and currency fields define the customer’s preferences. The consents field maintains an array of consent records in chronological order. Loyalty and discount information is provided through the loyaltyDiscountProgress field. The metafields and metafield fields allow access to custom metadata associated with the customer. This type is used across multiple parts of the API including orders, reviews, comments, and cart operations.
Example
query {
customer(id: 12345) {
id
customerNumber
name
firstName
lastName
email
orderCount
orderTotal
acceptsMarketing
address {
street
city
country
}
language {
code
}
currency {
code
}
consents {
type
status
}
metafields {
namespace
key
value
}
}
}Implements
None