Schema Documentation

customer

Description

A customer object

Response

Returns a Customer

Arguments
NameDescription
id - ID Get the customer by their global ID
customerId - Int Get the customer by their database ID

Example

Query
query customer(  $id: ID,  $customerId: Int){  customer(    id: $id,    customerId: $customerId  ){    availablePaymentMethods {      ...PaymentTokenFragment    }availablePaymentMethodsCC {      ...PaymentTokenCCFragment    }availablePaymentMethodsEC {      ...PaymentTokenECheckFragment    }billing {      ...CustomerAddressFragment    }calculatedShippingdatabaseIddatedisplayNamedownloadableItems {      ...CustomerToDownloadableItemConnectionFragment    }emailfirstNamehasCalculatedShippingidisJwtAuthSecretRevokedisPayingCustomerisVatExemptjwtAuthExpirationjwtAuthTokenjwtRefreshTokenjwtUserSecretlastNamelastOrder {      ...OrderFragment    }metaData {      ...MetaDataFragment    }modifiedorderCountorders {      ...CustomerToOrderConnectionFragment    }refunds {      ...CustomerToRefundConnectionFragment    }rolesession {      ...MetaDataFragment    }sessionTokenshipping {      ...CustomerAddressFragment    }subscriptions {      ...SubscriptionFragment    }totalSpentusername  }}
Variables
{"id":4,"customerId":987}
Response
{"data":{"customer":{"availablePaymentMethods":[PaymentToken],"availablePaymentMethodsCC":[PaymentTokenCC],"availablePaymentMethodsEC":[PaymentTokenECheck],"billing":CustomerAddress,"calculatedShipping":false,"databaseId":987,"date":"xyz789","displayName":"xyz789","downloadableItems":CustomerToDownloadableItemConnection,"email":"xyz789","firstName":"abc123","hasCalculatedShipping":false,"id":4,"isJwtAuthSecretRevoked":true,"isPayingCustomer":true,"isVatExempt":false,"jwtAuthExpiration":"xyz789","jwtAuthToken":"abc123","jwtRefreshToken":"abc123","jwtUserSecret":"abc123","lastName":"xyz789","lastOrder":Order,"metaData":[MetaData],"modified":"xyz789","orderCount":123,"orders":CustomerToOrderConnection,"refunds":CustomerToRefundConnection,"role":"xyz789","session":[MetaData],"sessionToken":"xyz789","shipping":CustomerAddress,"subscriptions":[Subscription],"totalSpent":987.65,"username":"abc123"}}}