Purchasing Entity
Requires The user must have access to customers and orders or draft orders.
Represents information about the purchasing entity for the order or draft order.
Anchor to Possible typesPossible types
- •OBJECT
Represents information about a customer of the shop, such as the customer's contact details, their order history, and whether they've agreed to receive marketing material by email.
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.
- Anchor to addressesaddresses•[Mailing
Address!]! non-null A list of addresses associated with the customer.
- Anchor to addressesV2addresses•Mailing
V2 Address Connection! non-null The addresses associated with the customer.
- Anchor to amountSpentamount•Money
Spent V2! non-null The total amount that the customer has spent on orders in their lifetime.
- Anchor to canDeletecan•Boolean!
Delete 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 companyContactProfilescompany•[Company
Contact Profiles Contact!]! non-null A list of the customer's company contact profiles.
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the customer was added to the store.
- Anchor to dataSaleOptOutdata•Boolean!
Sale Opt Out non-null Whether the customer has opted out of having their data sold.
- Anchor to defaultAddressdefault•Mailing
Address Address The default address associated with the customer.
- Anchor to defaultEmailAddressdefault•Customer
Email Address Email Address The customer's default email address.
- Anchor to defaultPhoneNumberdefault•Customer
Phone Number Phone Number The customer's default phone number.
- Anchor to displayNamedisplay•String!
Name 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.
- Anchor to eventsevents•Event
Connection! non-null A list of events associated with the customer.
- Anchor to firstNamefirst•String
Name The customer's first name.
- •ID!non-null
A globally-unique ID.
- Anchor to imageimage•Image!non-null
The image associated with the customer.
- Anchor to lastNamelast•String
Name The customer's last name.
- Anchor to lastOrderlast•Order
Order The customer's last order.
- Anchor to legacyResourceIdlegacy•Unsigned
Resource Id Int64! non-null The ID of the corresponding resource in the REST Admin API.
- Anchor to lifetimeDurationlifetime•String!
Duration non-null The amount of time since the customer was first added to the store.
Example: 'about 12 years'.
- Anchor to localelocale•String!non-null
The customer's locale.
- Anchor to mergeablemergeable•Customer
Mergeable! non-null Whether the customer can be merged with another customer.
- Anchor to metafieldmetafield•Metafield
A custom field, including its
namespace
andkey
, that's associated with a Shopify resource for the purposes of adding and storing additional information.- Anchor to metafieldsmetafields•Metafield
Connection! non-null A list of custom fields that a merchant associates with a Shopify resource.
- Anchor to multipassIdentifiermultipass•String
Identifier A unique identifier for the customer that's used with Multipass login.
- Anchor to notenote•String
A note about the customer.
- Anchor to numberOfOrdersnumber•Unsigned
Of Orders Int64! non-null The number of orders that the customer has made at the store in their lifetime.
- Anchor to ordersorders•Order
Connection! non-null A list of the customer's orders.
- Anchor to paymentMethodspayment•Customer
Methods Payment Method Connection! non-null A list of the customer's payment methods.
- Anchor to productSubscriberStatusproduct•Customer
Subscriber Status Product Subscriber Status! non-null Possible subscriber states of a customer defined by their subscription contracts.
- Anchor to statestate•Customer
State! non-null The state of the customer's account with the shop.
Please note that this only meaningful when Classic Customer Accounts is active.
- Anchor to statisticsstatistics•Customer
Statistics! non-null The statistics for a given customer.
- Anchor to storeCreditAccountsstore•Store
Credit Accounts Credit Account Connection! 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.
- Anchor to subscriptionContractssubscription•Subscription
Contracts Contract Connection! non-null A list of the customer's subscription contracts.
- •[String!]!non-null
A comma separated list of tags that have been added to the customer.
- Anchor to taxExempttax•Boolean!
Exempt non-null Whether the customer is exempt from being charged taxes on their orders.
- Anchor to taxExemptionstax•[Tax
Exemptions Exemption!]! non-null The list of tax exemptions applied to the customer.
- Anchor to updatedAtupdated•Date
At Time! non-null The date and time when the customer was last updated.
- Anchor to verifiedEmailverified•Boolean!
Email non-null Whether the customer has verified their email address. Defaults to
true
if the customer is created through the Shopify admin or API.- Anchor to emailemail•StringDeprecated
- Anchor to emailMarketingConsentemail•Customer
Marketing Consent Email Marketing Consent State Deprecated - Anchor to hasTimelineCommenthas•Boolean!
Timeline Comment non-nullDeprecated - Anchor to marketmarket•MarketDeprecated
- Anchor to metafieldDefinitionsmetafield•Metafield
Definitions Definition Connection! non-nullDeprecated - Anchor to phonephone•StringDeprecated
- Anchor to smsMarketingConsentsms•Customer
Marketing Consent Sms Marketing Consent State Deprecated - Anchor to unsubscribeUrlunsubscribe•URL!
Url non-nullDeprecated - Anchor to validEmailAddressvalid•Boolean!
Email Address non-nullDeprecated
- •OBJECT
Represents information about the purchasing company for the order or draft order.
- Anchor to companycompany•Company!non-null
The company associated to the order or draft order.
- Anchor to contactcontact•Company
Contact The company contact associated to the order or draft order.
- Anchor to locationlocation•Company
Location! non-null The company location associated to the order or draft order.
Anchor to Fields with this unionFields with this union
- •OBJECT
The calculated fields for a draft order.
- •OBJECT
An order that a merchant creates on behalf of a customer. Draft orders are useful for merchants that need to do the following tasks:
- Create new orders for sales made by phone, in person, by chat, or elsewhere. When a merchant accepts payment for a draft order, an order is created.
- Send invoices to customers to pay with a secure checkout link.
- Use custom items to represent additional costs or products that aren't displayed in a shop's inventory.
- Re-create orders manually from active sales channels.
- Sell products at discount or wholesale rates.
- Take pre-orders.
For draft orders in multiple currencies
is the source of truth for what a customer is going to be charged and
is an estimate of what the merchant might receive in their shop currency.
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.
Draft orders created on or after April 1, 2025 will be automatically purged after one year of inactivity.
- •OBJECT
The
Order
object represents a customer's request to purchase one or more products from a store. Use theOrder
object to handle the complete purchase lifecycle from checkout to fulfillment.Use the
Order
object when you need to:- Display order details on customer account pages or admin dashboards.
- Create orders for phone sales, wholesale customers, or subscription services.
- Update order information like shipping addresses, notes, or fulfillment status.
- Process returns, exchanges, and partial refunds.
- Generate invoices, receipts, and shipping labels.
The
Order
object serves as the central hub connecting customer information, product details, payment processing, and fulfillment data within the GraphQL Admin API schema.NoteOnly the last 60 days' worth of orders from a store are accessible from the
Order
object by default. If you want to access older records, then you need to request access to all orders. If your app is granted access, then you can add the,
, and
scopes.
CautionOnly use orders 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.
Learn more about building apps for orders and fulfillment.