--- title: customer - Customer API description: Returns the Customer resource. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). api_version: 2025-10 api_name: customer type: query api_type: graphql source_url: html: https://shopify.dev/docs/api/customer/latest/queries/customer md: https://shopify.dev/docs/api/customer/latest/queries/customer.md --- # customer query Returns the Customer resource. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). ## Possible returns * Customer [Customer!](https://shopify.dev/docs/api/customer/latest/objects/Customer) Represents the personal information of a customer. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). *** ## Examples * ### With access to all personal data #### Description Retrieve basic customer information including their first name, last name, and email address. This query returns essential customer details that are commonly needed in customer account interfaces. #### Query ```graphql query { customer { firstName lastName emailAddress { emailAddress } } } ``` #### cURL ```bash curl -X POST \ https://shopify.com//account/customer/api/2025-10/graphql/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'Authorization: {access_token}' \ -d '{ "query": "query { customer { firstName lastName emailAddress { emailAddress } } }" }' ``` #### Response ```json { "customer": { "firstName": "Sally", "lastName": "Testopherson", "emailAddress": { "emailAddress": "testacustomer@example.com" } } } ``` * ### Without access to all personal data #### Description Demonstrates how GraphQL handles access to restricted fields like phoneNumber. When an app doesn't have permission to access certain customer data, the API returns an error with details about the required permissions. #### Query ```graphql query { customer { firstName lastName phoneNumber { phoneNumber } } } ``` #### cURL ```bash curl -X POST \ https://shopify.com//account/customer/api/2025-10/graphql/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'Authorization: {access_token}' \ -d '{ "query": "query { customer { firstName lastName phoneNumber { phoneNumber } } }" }' ``` #### Response ```json { "data": { "customer": { "firstName": "Sally", "lastName": "Testopherson", "phoneNumber": { "phoneNumber": null } } }, "errors": [ { "message": "This app is not approved to use the phoneNumber field. See https://partners.shopify.com/123/apps/456/customer_data for more details.", "locations": [], "path": [ "customer", "phoneNumber", "phoneNumber" ] } ] } ``` [Open in GraphiQL](http://localhost:3457/graphiql?query=query%20%7B%0A%20%20customer%20%7B%0A%20%20%20%20firstName%0A%20%20%20%20lastName%0A%20%20%20%20emailAddress%20%7B%0A%20%20%20%20%20%20emailAddress%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D) ```graphql query { customer { firstName lastName emailAddress { emailAddress } } } ``` ##### GQL ``` query { customer { firstName lastName emailAddress { emailAddress } } } ``` ##### cURL ``` curl -X POST \ https://shopify.com//account/customer/api/2025-10/graphql/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'Authorization: {access_token}' \ -d '{ "query": "query { customer { firstName lastName emailAddress { emailAddress } } }" }' ``` ## Response JSON ```json { "customer": { "firstName": "Sally", "lastName": "Testopherson", "emailAddress": { "emailAddress": "testacustomer@example.com" } } } ```