Schema Documentation
Customer
Description
A customer object
Fields
Field Name | Description |
---|---|
availablePaymentMethods - [PaymentToken] | Customer's stored payment tokens. |
availablePaymentMethodsCC - [PaymentTokenCC] | Customer's stored payment tokens. |
availablePaymentMethodsEC - [PaymentTokenECheck] | Customer's stored payment tokens. |
billing - CustomerAddress | Return the date customer billing address properties |
calculatedShipping - Boolean | Has customer calculated shipping? |
databaseId - Int | The ID of the customer in the database |
date - String | Return the date customer was created |
displayName - String | Return the customer's display name. |
downloadableItems - CustomerToDownloadableItemConnection | Connection between the Customer type and the DownloadableItem type |
Arguments
| |
email - String | Return the customer's email. |
firstName - String | Return the customer's first name. |
hasCalculatedShipping - Boolean | Has calculated shipping? |
id - ID! | The globally unique identifier for the customer |
isJwtAuthSecretRevoked - Boolean! | Whether the JWT User secret has been revoked. If the secret has been revoked, auth tokens will not be issued until an admin, or user with proper capabilities re-issues a secret for the user. |
isPayingCustomer - Boolean | Return the date customer was last updated |
isVatExempt - Boolean | Is customer VAT exempt? |
jwtAuthExpiration - String | The expiration for the JWT Token for the user. If not set custom for the user, it will use the default sitewide expiration setting |
jwtAuthToken - String | A JWT token that can be used in future requests for authentication/authorization |
jwtRefreshToken - String | A JWT token that can be used in future requests to get a refreshed jwtAuthToken. If the refresh token used in a request is revoked or otherwise invalid, a valid Auth token will NOT be issued in the response headers. |
jwtUserSecret - String | A unique secret tied to the users JWT token that can be revoked or refreshed. Revoking the secret prevents JWT tokens from being issued to the user. Refreshing the token invalidates previously issued tokens, but allows new tokens to be issued. |
lastName - String | Return the customer's last name. |
lastOrder - Order | Gets the customers last order. |
metaData - [MetaData] | Object meta data |
modified - String | Return the date customer was last updated |
orderCount - Int | Return the number of orders this customer has. |
orders - CustomerToOrderConnection | Connection between the Customer type and the Order type |
Arguments
| |
refunds - CustomerToRefundConnection | Connection between the Customer type and the Refund type |
Arguments
| |
role - String | Return the customer's user role. |
session - [MetaData] | Session data for the viewing customer |
sessionToken - String | A JWT token that can be used in future requests to for WooCommerce session identification |
shipping - CustomerAddress | Return the date customer shipping address properties |
subscriptions - [Subscription] | Subscriptions on the order. |
totalSpent - Float | Return how much money this customer has spent. |
username - String | Return the customer's username. |
Example
{"availablePaymentMethods":[PaymentToken],"availablePaymentMethodsCC":[PaymentTokenCC],"availablePaymentMethodsEC":[PaymentTokenECheck],"billing":CustomerAddress,"calculatedShipping":true,"databaseId":123,"date":"abc123","displayName":"abc123","downloadableItems":CustomerToDownloadableItemConnection,"email":"abc123","firstName":"xyz789","hasCalculatedShipping":true,"id":4,"isJwtAuthSecretRevoked":false,"isPayingCustomer":true,"isVatExempt":false,"jwtAuthExpiration":"abc123","jwtAuthToken":"abc123","jwtRefreshToken":"xyz789","jwtUserSecret":"xyz789","lastName":"abc123","lastOrder":Order,"metaData":[MetaData],"modified":"abc123","orderCount":987,"orders":CustomerToOrderConnection,"refunds":CustomerToRefundConnection,"role":"xyz789","session":[MetaData],"sessionToken":"abc123","shipping":CustomerAddress,"subscriptions":[Subscription],"totalSpent":987.65,"username":"xyz789"}