TanqoryDocs

customer

  • Query
  • Storefront

Returns the signed-in customer that a valid customerAccessToken belongs to, or null when the token is unknown or expired.

Arguments

ArgumentTypeRequiredDefault
customerAccessTokenString!Required

Returns

Customer A shopper's account with the store: name, email, phone, saved addresses, orders, tags and marketing consent.

FieldTypeDescription
acceptsMarketingBoolean!
addressesMailingAddressConnection!
avatarUrlString
createdAtDateTime!
defaultAddressMailingAddress
displayNameString!
emailString
firstNameString
idID!
lastNameString
metafieldMetafield
metafields[Metafield]!
numberOfOrdersUnsignedInt64!
ordersOrderConnection!
phoneString
socialLoginProviderSocialLoginProvider
tags[String!]!
updatedAtDateTime!
tanqoryExtPendingEmailString

The new email the customer asked for with customerUpdate, waiting for them to confirm it from the link mailed to that address; null when no change is waiting or its link has expired. email stays the old address until then. Private token only.

tanqoryExtOrderOrder

One of this customer's own orders by its ID (gid://tanqory/Order/<uuid>); null for any other order. Private token only.

tanqoryExtSubscriptionContracts[TanqoryExtSubscriptionContract!]!

The customer's subscription contracts, newest first (A-09). Private token only.

tanqoryExtCompanyLocations[TanqoryExtCompanyLocation!]!

The B2B company locations the customer has a role at (A-23). Private token only.

tanqoryExtCompanyLocationTanqoryExtCompanyLocation

One of those locations by id (a CompanyLocation gid), or null when the customer may not buy for it. Private token only.

tanqoryExtStoreCreditAccounts[TanqoryExtStoreCreditAccount!]!

The customer's store credit accounts and balances (A-24). Private token only.

tanqoryExtMarketingConsentTanqoryExtCustomerMarketingConsent!

Email, SMS and WhatsApp marketing consent (A-05). Email consent is changed with customerUpdate(acceptsMarketing). Private token only.

Example request

A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.

Set STORE_ID and TANQORY_STOREFRONT_TOKEN in your environment first (Make your first API call).

curl
curl -X POST "https://$STORE_HOST/api/v1/stores/$STORE_ID/2026-10/graphql" \
  -H "X-Tanqory-Storefront-Access-Token: $TANQORY_STOREFRONT_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"query":"query Customer($customerAccessToken: String!) {\n  customer(customerAccessToken: $customerAccessToken) {\n    acceptsMarketing\n    avatarUrl\n    createdAt\n    defaultAddress { id }\n    displayName\n    email\n    firstName\n    id\n    lastName\n    numberOfOrders\n  }\n}","variables":{"customerAccessToken":""}}'

Built from commit c0b3fb3fdef7 · API version 2026-10