customer
Get the currently authenticated customer. Requires a valid customer access token via the @storeContext directive.
Authentication
Authentication Required: Secret API key with scope
customer:read
Query Structure
{
customer {
id
customerNumber
name
address
tags
hasAccess
username
firstName
lastName
language
currency
acceptsMarketing
consents
orderCount
orderTotal
refundCount
refundTotal
firstOrderDate
lastOrderDate
audiences
loyaltyDiscountProgress
metafields
metafield
}
}Arguments
This query accepts no arguments.
Return Type
Customer - A customer profile including name, contact information, order history, and preferences.
Example
{
customer {
id
firstName
lastName
name
username
email
acceptsMarketing
orderCount
orderTotal
refundTotal
firstOrderDate
lastOrderDate
tags
audiences
consents {
type
status
timestamp
}
address {
street
city
state
postalCode
country
}
metafields {
namespace
key
value
}
}
}