Skip to main content
query

Returns a Customer resource by ID.

•ID!
required

The ID of the Customer to return.


Was this section helpful?

•Customer

Information about a customer of the shop, such as the customer's contact details, purchase history, and marketing preferences.

Tracks the customer's total spending through the amountSpent field and provides access to associated data such as payment methods and subscription contracts.


Caution

Only use this data if it's required for your app's functionality. Shopify will restrict access to scopes for apps that don't have a legitimate use for the associated data.


•MailingAddressConnection!
non-null

The addresses associated with the customer.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.


•MoneyV2!
non-null

The total amount that the customer has spent on orders in their lifetime.

•Boolean!
non-null

Whether the merchant can delete the customer from their store.

A customer can be deleted from a store only if they haven't yet made an order. After a customer makes an order, they can't be deleted from a store.

Anchor to companyContactProfilescompanyContactProfiles
•[CompanyContact!]!
non-null

A list of the customer's company contact profiles.

•DateTime!
non-null

The date and time when the customer was added to the store.

•Boolean!
non-null

Whether the customer has opted out of having their data sold.

•MailingAddress

The default address associated with the customer.

•CustomerEmailAddress

The customer's default email address.

•CustomerPhoneNumber

The customer's default phone number.

•String!
non-null

The full name of the customer, based on the values for first_name and last_name. If the first_name and last_name are not available, then this falls back to the customer's email address, and if that is not available, the customer's phone number.

•EventConnection!
non-null

A list of events associated with the customer.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•String

A filter made up of terms, connectives, modifiers, and comparators. | comments | boolean | Whether or not to include comment-events in your search, passing false will exclude comment-events, any other value will include comment-events. | | | - false
- true | | created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - created_at:>2025-10-21
- created_at:<now | | id | id | Filter by id range. | | | - id:1234
- id:>=1234
- id:<=1234 | | subject_type | string | The resource type affected by this event. See EventSubjectType for possible values. | | | - PRODUCT_VARIANT
- PRODUCT
- COLLECTION | You can apply one or more filters to a query. Learn more about Shopify API search syntax.

•string

The action that occured.

Example:

  • action:create
•Boolean
Default:false

Reverse the order of the underlying list.

•EventSortKeys
Default:ID

Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.


•String

The customer's first name.

•ID!
non-null

A globally-unique ID.

•Image!
non-null

The image associated with the customer.

Arguments

•Int
Deprecated

•String

The customer's last name.

•Order

The customer's last order.

•UnsignedInt64!
non-null

The ID of the corresponding resource in the REST Admin API.

•String!
non-null

The amount of time since the customer was first added to the store.

Example: 'about 12 years'.

•String!
non-null

The customer's locale.

•CustomerMergeable!
non-null

Whether the customer can be merged with another customer.

•Metafield

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

Arguments

•String!
required

The key for the metafield.

•String

The container the metafield belongs to. If omitted, the app-reserved namespace will be used.


•MetafieldConnection!
non-null

A list of custom fields that a merchant associates with a Shopify resource.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•[String!]

List of keys of metafields in the format namespace.key, will be returned in the same format.

•Int

The last n elements from the paginated list.

•String

The metafield namespace to filter by. If omitted, all metafields are returned.

•Boolean
Default:false

Reverse the order of the underlying list.


•String

A unique identifier for the customer that's used with Multipass login.

•String

A note about the customer.

•UnsignedInt64!
non-null

The number of orders that the customer has made at the store in their lifetime.

•OrderConnection!
non-null

A list of the customer's orders.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•String

A filter made up of terms, connectives, modifiers, and comparators.

nametypedescriptionacceptable_valuesdefault_valueexample_use
defaultstringFilter by a case-insensitive search of multiple fields
in a document.- query=Bob Norman
- query=title:green hoodie
cart_tokenstringFilter by the cart token's unique value to track
abandoned cart conversions or troubleshoot checkout issues. The token
references the cart that's associated with an order.-
cart_token:abc123
channelstringFilter by the channel information handle
(ChannelInformation.channelDefinition.handle) field.-
channel:web
- channel:web,pos
channel_ididFilter by the channel id
field.- channel_id:123
chargeback_statusstringFilter by the order's chargeback status. A
chargeback occurs when a customer questions the legitimacy of a charge with
their financial institution.- accepted
- charge_refunded
-
lost
- needs_response
- under_review
- won
-
chargeback_status:accepted
checkout_tokenstringFilter by the checkout token's unique value to
analyze conversion funnels or resolve payment issues. The checkout token's
value references the checkout that's associated with an order.-
checkout_token:abc123
confirmation_numberstringFilter by the randomly generated
alpha-numeric identifier for an order that can be displayed to the customer
instead of the sequential order name. This value isn't guaranteed to be
unique.- confirmation_number:ABC123
created_attimeFilter by the date and time when the order was created
in Shopify's system.- created_at:2020-10-21T23:39:20Z
-
created_at:<now
- created_at:<=2024
credit_card_last4stringFilter by the last four digits of the payment
card that was used to pay for the order. This filter matches only the last
four digits of the card for heightened security.-
credit_card_last4:1234
current_total_pricefloatFilter by the current total price of the
order in the shop currency, including any returns/refunds/removals. This
filter supports both exact values and ranges.-
current_total_price:10
- `current_total_price:>=5.00
current_total_price:<=20.99`
customer_ididFilter orders by the customer id
field.- customer_id:123
delivery_methodstringFilter by the delivery methodType
field.- shipping
- pick-up
- retail
- local
-
pickup-point
- none
- delivery_method:shipping
discount_codestringFilter by the case-insensitive discount code that
was applied to the order at checkout. Limited to the first discount code
used on an order. Maximum characters: 255.- discount_code:ABC123
emailstringFilter by the email address that's associated with the
order to provide customer support or analyze purchasing patterns.-
email:example@shopify.com
financial_statusstringFilter by the order displayFinancialStatus
field.- paid
- pending
- authorized
-
partially_paid
- partially_refunded
- refunded
-
voided
- expired
- financial_status:authorized
fraud_protection_levelstringFilter by the level of fraud protection
that's applied to the order. Use this filter to manage risk or handle
disputes.- fully_protected
- partially_protected
-
not_protected
- pending
- not_eligible
-
not_available- fraud_protection_level:fully_protected
fulfillment_location_ididFilter by the fulfillment location id
(Fulfillment.location.id) field.- fulfillment_location_id:123
fulfillment_statusstringFilter by the displayFulfillmentStatus
field to prioritize shipments or monitor order processing.-
unshipped
- shipped
- fulfilled
- partial
-
scheduled
- on_hold
- unfulfilled
- request_declined
- fulfillment_status:fulfilled
gatewaystringFilter by the paymentGatewayNames
field. Use this filter to find orders that were processed through specific
payment providers like Shopify Payments, PayPal, or other custom payment
gateways.- gateway:shopify_payments
ididFilter by id range.- id:1234
- id:>=1234
- id:<=1234
location_ididFilter by the location id
that's associated with the order to view and manage orders for specific
locations. For POS orders, locations must be defined in the Shopify admin
under Settings > Locations. If no ID is provided, then the primary
location of the shop is returned.- location_id:123
metafields.{namespace}.{key}mixedFilters resources by metafield
value. Format: metafields.{namespace}.{key}:{value}. Learn more about
querying by metafield value.
- metafields.custom.on_sale:true
-
metafields.product.material:"gid://shopify/Metaobject/43458085"
namestringFilter by the order name
field.- name:1001-A
payment_idstringFilter by the payment ID that's associated with the
order to reconcile financial records or troubleshoot payment issues.-
payment_id:abc123
payment_provider_ididFilter by the ID of the payment provider that's
associated with the order to manage payment methods or troubleshoot
transactions.- payment_provider_id:123
po_numberstringFilter by the order poNumber
field.- po_number:P01001
processed_attimeFilter by the order processedAt
field.- processed_at:2021-01-01T00:00:00Z
reference_location_ididFilter by the ID of a location that's
associated with the order, such as locations from fulfillments, refunds, or
the shop's primary location.- reference_location_id:123
return_statusstringFilter by the order's returnStatus
to monitor returns processing and track which orders have active returns.
  • return_requested
    - in_progress
    - inspection_complete
  • returned
    - return_failed
    - no_return | | - return_status:in_progress | | risk_level | string | Filter by the order risk assessment riskLevel field. | - high
    - medium
    - low
    - none
    - pending | | - risk_level:high | | sales_channel | string | Filter by the sales channel where the order was made to analyze performance or manage fulfillment processes. | | | - sales_channel: some_sales_channel | | sku | string | Filter by the product variant sku field. Learn more about SKUs. | | | - sku:ABC123 | | source_identifier | string | Filter by the ID of the order placed on the originating platform, such as a unique POS or third-party identifier. This value doesn't correspond to the Shopify ID that's generated from a completed draft order. | | | - source_identifier:1234-12-1000 | | source_name | string | Filter by the platform where the order was placed to distinguish between web orders, POS sales, draft orders, or third-party channels. Use this filter to analyze sales performance across different ordering methods. | | | - source_name:web
    - source_name:shopify_draft_order | | status | string | Filter by the order's status to manage workflows or analyze the order lifecycle. | - open
    - closed
    - cancelled
    - not_closed | | - status:open | | subtotal_line_items_quantity | string | Filter by the total number of items across all line items in an order. This filter supports both exact values and ranges, and is useful for identifying bulk orders or analyzing purchase volume patterns. | | | - subtotal_line_items_quantity:10
    - subtotal_line_items_quantity:5..20 | | tag | string | Filter objects by the tag field. | | | - tag:my_tag | | tag_not | string | Filter by objects that don’t have the specified tag. | | | - tag_not:my_tag | | test | boolean | Filter by test orders. Test orders are made using the Shopify Bogus Gateway or a payment provider with test mode enabled. | | | - test:true | | total_weight | string | Filter by the order weight. This filter supports both exact values and ranges, and is to be used to filter orders by the total weight of all items (excluding packaging). It takes a unit of measurement as a suffix. It accepts the following units: g, kg, lb, oz. | | | - total_weight:10.5kg
    - total_weight:>=5g total_weight:<=20g
  • total_weight:.5 lb | | updated_at | time | Filter by the date and time when the order was last updated in Shopify's system. | | | - updated_at:2020-10-21T23:39:20Z
  • updated_at:<now
    - updated_at:<=2024 | You can apply one or more filters to a query. Learn more about Shopify API search syntax.
•Boolean
Default:false

Reverse the order of the underlying list.

•OrderSortKeys
Default:ID

Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.


•CustomerPaymentMethodConnection!
non-null

A list of the customer's payment methods.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.

•Boolean
Default:false

Whether to show the customer's revoked payment method.


Anchor to productSubscriberStatusproductSubscriberStatus
•CustomerProductSubscriberStatus!
non-null

Possible subscriber states of a customer defined by their subscription contracts.

•CustomerState!
non-null

The state of the customer's account with the shop.

Please note that this only meaningful when Classic Customer Accounts is active.

•CustomerStatistics!
non-null

The statistics for a given customer.

•StoreCreditAccountConnection!
non-null

Returns a list of store credit accounts that belong to the owner resource. A store credit account owner can hold multiple accounts each with a different currency.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•String

A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.

Anchor to currency_code
•string
•id

Filter by id range.

Example:

  • id:1234
  • id:>=1234
  • id:<=1234

Anchor to subscriptionContractssubscriptionContracts
•SubscriptionContractConnection!
non-null

A list of the customer's subscription contracts.

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.


•[String!]!
non-null

A comma separated list of tags that have been added to the customer.

•Boolean!
non-null

Whether the customer is exempt from being charged taxes on their orders.

•[TaxExemption!]!
non-null

The list of tax exemptions applied to the customer.

•DateTime!
non-null

The date and time when the customer was last updated.

•Boolean!
non-null

Whether the customer has verified their email address. Defaults to true if the customer is created through the Shopify admin or API.

•[MailingAddress!]!
non-nullDeprecated

Arguments

•Int

Truncate the array result to this size.


•String
Deprecated
Anchor to emailMarketingConsentemailMarketingConsent
•CustomerEmailMarketingConsentState
Deprecated
•Boolean!
non-nullDeprecated
•Market
Deprecated
Anchor to metafieldDefinitionsmetafieldDefinitions
•MetafieldDefinitionConnection!
non-nullDeprecated

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•String

Filter metafield definitions by namespace.

•MetafieldDefinitionPinnedStatus
Default:ANY

Filter by the definition's pinned status.

•String

A filter made up of terms, connectives, modifiers, and comparators.

nametypedescriptionacceptable_valuesdefault_valueexample_use
defaultstringFilter by a case-insensitive search of multiple fields
in a document.- query=Bob Norman
- query=title:green hoodie
created_attimeFilter by the date and time when the metafield
definition was created.- created_at:>2020-10-21T23:39:20Z
-
created_at:<now
- created_at:<=2024
ididFilter by id range.- id:1234
- id:>=1234
- id:<=1234
keystringFilter by the metafield definition key
field.- key:some-key
namespacestringFilter by the metafield definition namespace
field.- namespace:some-namespace
owner_typestringFilter by the metafield definition ownerType
field.- owner_type:PRODUCT
typestringFilter by the metafield definition type
field.- type:single_line_text_field
updated_attimeFilter by the date and time when the metafield
definition was last updated.- updated_at:>2020-10-21T23:39:20Z
  • updated_at:<now
    - updated_at:<=2024 | You can apply one or more filters to a query. Learn more about Shopify API search syntax.
•Boolean
Default:false

Reverse the order of the underlying list.

•MetafieldDefinitionSortKeys
Default:ID

Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.


•String
Deprecated
•CustomerSmsMarketingConsentState
Deprecated
•URL!
non-nullDeprecated
•Boolean!
non-nullDeprecated

Was this section helpful?