Customer
AddressPayload
Section titled “AddressPayload”What the address mutations return.
address
Section titled “address”Address
The address after the operation, or null when it was deleted or not found.
customer
Section titled “customer”Customer
The buyer, so a re-render sees the new book and the new default.
userErrors
Section titled “userErrors”[UserError!]!
No description.
ChannelConsent
Section titled “ChannelConsent”Consent for one channel.
channel
Section titled “channel”MarketingChannel!
No description.
optedIn
Section titled “optedIn”Boolean!
Whether the buyer has opted in.
updatedAt
Section titled “updatedAt”DateTime
When they last changed it.
Kept because consent is a claim the merchant may have to evidence, and a boolean with no date evidences nothing.
source
Section titled “source”String
Where the opt-in happened — checkout, footer, account.
Customer
Section titled “Customer”The signed-in buyer.
Reached only through Query.customer, which is null when no token was sent and
raises UNAUTHENTICATED when a token was sent and was not good. Those are
different situations: the first is a signed-out visitor opening the account
page, the second is a session that needs refreshing.
ID!
No description.
String!
The mobile number the account is identified by — 09xxxxxxxxx.
This is the identity, not a contact detail. Changing it is a separate, separately-verified operation, because a mobile number that could be changed with the session it authenticates is a session that can be made permanent by whoever borrows it once.
firstName
Section titled “firstName”String
Given name — نام. Null until the buyer gives one.
lastName
Section titled “lastName”String
Family name — نام خانوادگی.
displayName
Section titled “displayName”String!
Whatever there is to greet them by: the full name, else the masked phone number.
Composed here so every theme greets a buyer the same way, and none has to decide what to do when only half a name was given.
String
Email. Optional here, and frequently absent — SMS is the channel that matters.
emailVerified
Section titled “emailVerified”Boolean!
Whether the email has been confirmed.
False means it may be somebody else’s address, typed wrongly. Do not send anything sensitive to an unconfirmed address.
addresses
Section titled “addresses”AddressConnection!
The saved address book, newest first.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
last | Int | No description. |
before | String | No description. |
defaultAddress
Section titled “defaultAddress”Address
The address checkout preselects, or null when none is marked.
Returned alongside addresses so a checkout does not page through the book
to find one.
invoiceProfiles
Section titled “invoiceProfiles”[InvoiceProfile!]!
Legal identities saved for official invoices — فاکتور رسمی.
Saved so a buyer who always invoices to the same company does not retype a شناسه ملی and a کد اقتصادی on every order.
orders
Section titled “orders”OrderConnection!
The buyer’s orders, newest first.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
last | Int | No description. |
before | String | No description. |
sortKey | OrderSortKeys · default "PLACED_AT" | No description. |
reverse | Boolean · default true | No description. |
financialStatus | OrderFinancialStatus | No description. |
fulfillmentStatus | OrderFulfillmentStatus | No description. |
query | String | No description. |
Order
One of the buyer’s orders, by id or by order number. Supply exactly one.
| Argument | Type | Meaning |
|---|---|---|
id | ID | No description. |
number | String | No description. |
wishlist
Section titled “wishlist”WishlistItemConnection!
Products the buyer saved — علاقهمندیها.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
last | Int | No description. |
before | String | No description. |
wishlistContains
Section titled “wishlistContains”[Boolean!]!
Whether specific products are saved, without paging the whole list.
For rendering the heart on a product or collection page. Positional: one entry per id, in the order asked.
| Argument | Type | Meaning |
|---|---|---|
productIds | [ID!]! | No description. |
marketingConsent
Section titled “marketingConsent”MarketingConsent!
What the buyer has agreed to be contacted on.
sessions
Section titled “sessions”[CustomerSession!]!
Every device this buyer is signed in on.
Worth surfacing rather than hiding: SMS-OTP is weak against SIM swap, and a buyer noticing a session they do not recognise is the cheapest detection this platform has.
dataRequests
Section titled “dataRequests”[DataRequest!]!
Outstanding export and deletion requests. Empty when there are none.
createdAt
Section titled “createdAt”DateTime!
When the account was created — the first successful verification.
updatedAt
Section titled “updatedAt”DateTime!
No description.
metafield
Section titled “metafield”Metafield
Custom data an app attached to this buyer — a loyalty tier, a referral code.
Readable only where the definition was published to the storefront APIs, and written only through the Admin API: a buyer may see what an app recorded about them, and may not edit it.
| Argument | Type | Meaning |
|---|---|---|
namespace | String | No description. |
key | String! | No description. |
metafields
Section titled “metafields”[Metafield]!
No description.
| Argument | Type | Meaning |
|---|---|---|
identifiers | [MetafieldIdentifier!]! | No description. |
CustomerPayload
Section titled “CustomerPayload”What the profile mutations return.
customer
Section titled “customer”Customer
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
CustomerUpdateInput
Section titled “CustomerUpdateInput”What the buyer may change about themselves.
firstName
Section titled “firstName”String
No description.
lastName
Section titled “lastName”String
No description.
String
Setting or changing this marks the address unverified and sends a confirmation link. Clearing it (explicit null) removes both the address and the verification.
DataExportDownloadPayload
Section titled “DataExportDownloadPayload”What customerDataExportDownload returns.
URL
Where to fetch the file. Absent on every refusal, rather than a link that will not open: a response carrying one is a response somebody retries with.
expiresAt
Section titled “expiresAt”DateTime
When url stops working: minutes from now.
userErrors
Section titled “userErrors”[UserError!]!
Why there is no link.
NOT_FOUND for a request that is not this buyer’s export. INVALID_STATE
for one not ready yet, or cancelled. EXPIRED once it has been downloaded or
its time has passed.
DataRequest
Section titled “DataRequest”A buyer’s request to receive or erase their data.
ID!
No description.
DataRequestKind!
Which kind.
status
Section titled “status”DataRequestStatus!
Where it has got to.
requestedAt
Section titled “requestedAt”DateTime!
When it was raised.
downloadUrl
Section titled “downloadUrl”URL · Deprecated
Always null. The file is the buyer’s whole history in one file, so its link
is never part of the request: customerDataExportDownload hands it over,
once, when the buyer presses download.
downloadExpiresAt
Section titled “downloadExpiresAt”DateTime
For a ready export: until when it may be downloaded — seven days after it became ready. Null once it has been downloaded, and for anything else.
effectiveAt
Section titled “effectiveAt”DateTime
For a deletion: when it becomes irreversible.
A grace period, during which customerAccountDeletionCancel still works.
Deletion is the one operation on this surface a buyer cannot undo by signing
in again, so it does not happen the moment it is asked for.
rejectionCode
Section titled “rejectionCode”UserErrorCode
Why it was refused, as a code from the shared catalogue.
DataRequestKind
Section titled “DataRequestKind”Which kind of data request.
| Value | Meaning |
|---|---|
EXPORT | Send me everything you hold about me. |
ERASURE | Erase me. Erasure means the buyer’s personal data is redacted — name, phone, email, addresses. It does not mean orders are deleted: an order is a tax record the merchant is required to retain, and a platform that deleted them would be helping a merchant break the law rather than helping a buyer exercise a right. The order survives with its buyer redacted. |
DataRequestPayload
Section titled “DataRequestPayload”What the data-request mutations return.
dataRequest
Section titled “dataRequest”DataRequest
No description.
userErrors
Section titled “userErrors”[UserError!]!
Why it was refused.
INVALID_STATE when a request of that kind is already open — a buyer gets
one at a time. RATE_LIMITED when exports are asked for too often.
DataRequestStatus
Section titled “DataRequestStatus”Where a data request has got to.
| Value | Meaning |
|---|---|
PENDING | Raised, not yet started. |
PROCESSING | Being assembled or applied. |
READY | An export is ready to download, until downloadExpiresAt. |
COMPLETED | An erasure has been applied; or an export was downloaded, or its time to be downloaded passed, and its file is gone. |
CANCELLED | An erasure withdrawn by the buyer during the grace period; or an export the shop closed on, or the buyer’s erasure ended. |
REJECTED | Refused; rejectionCode says why. |
InvoiceBuyerType
Section titled “InvoiceBuyerType”Who an official invoice is issued to.
The buyer classes سامانه مودیان recognises.
| Value | Meaning |
|---|---|
FINAL_CONSUMER | مصرفکننده نهایی — a retail buyer, identified by nothing. |
INDIVIDUAL | شخص حقیقی — an individual, identified by کد ملی. |
LEGAL_ENTITY | شخص حقوقی — a company, identified by شناسه ملی and کد اقتصادی. |
PARTNERSHIP | مشارکت مدنی — a civil partnership. |
NON_IRANIAN | اتباع غیرایرانی — a non-Iranian national. |
InvoiceProfile
Section titled “InvoiceProfile”A legal identity an official invoice can be issued to — فاکتور رسمی.
Which fields are required depends on buyerType, and the rules are the tax
system’s rather than ours: an individual is identified by کد ملی, a company by
شناسه ملی together with کد اقتصادی.
ID!
No description.
String
A name the buyer gave it — “شرکت”, “خودم”.
buyerType
Section titled “buyerType”InvoiceBuyerType!
What kind of buyer the invoice is issued to.
legalName
Section titled “legalName”String!
The name to issue it to — a person’s or a company’s.
nationalId
Section titled “nationalId”String!
کد ملی for an individual, شناسه ملی for a legal entity.
The most sensitive value on this surface, which is why access tokens are measured in minutes. Returned in full to the buyer it belongs to, and to nobody else.
nationalIdVerified
Section titled “nationalIdVerified”Boolean!
Whether the identifier has been matched against the phone number through Shahkar — سامانه شاهکار.
It matters commercially, not just for security: an invoice submitted to سامانه مودیان with a کد ملی that does not match its holder is rejected, and the merchant discovers it at the filing deadline rather than at the sale.
economicCode
Section titled “economicCode”String
کد اقتصادی. Legal entities only.
registrationNumber
Section titled “registrationNumber”String
شماره ثبت. Legal entities only.
address
Section titled “address”Address
The registered address the invoice is issued to.
isDefault
Section titled “isDefault”Boolean!
Whether checkout preselects this one.
createdAt
Section titled “createdAt”DateTime!
No description.
updatedAt
Section titled “updatedAt”DateTime!
No description.
InvoiceProfileInput
Section titled “InvoiceProfileInput”An invoice identity as the buyer supplies it.
String
No description.
buyerType
Section titled “buyerType”InvoiceBuyerType!
No description.
legalName
Section titled “legalName”String!
No description.
nationalId
Section titled “nationalId”String!
No description.
economicCode
Section titled “economicCode”String
No description.
registrationNumber
Section titled “registrationNumber”String
No description.
addressId
Section titled “addressId”ID
An address from the buyer’s own book. Must belong to them.
InvoiceProfilePayload
Section titled “InvoiceProfilePayload”What the invoice-profile mutations return.
invoiceProfile
Section titled “invoiceProfile”InvoiceProfile
No description.
customer
Section titled “customer”Customer
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
MarketingChannel
Section titled “MarketingChannel”A channel a shop can market on.
| Value | Meaning |
|---|---|
SMS | SMS — the channel that reaches everyone here. |
EMAIL | No description. |
PUSH | A web push subscription. |
MarketingConsent
Section titled “MarketingConsent”What the buyer has agreed to be contacted on, and when they agreed.
channels
Section titled “channels”[ChannelConsent!]!
One entry per channel the shop can use, opted in or not.
unsubscribedFromAll
Section titled “unsubscribedFromAll”Boolean!
A single switch that silences everything regardless of the per-channel settings.
Separate from opting out of each channel because “stop messaging me” and “stop messaging me by SMS” are different requests, and a buyer making the first should not have to make it three times.
MarketingConsentInput
Section titled “MarketingConsentInput”A change to marketing consent.
[MarketingChannel!]
Channels to opt into. Channels named in neither list are left alone.
optOut
Section titled “optOut”[MarketingChannel!]
Channels to opt out of.
unsubscribeFromAll
Section titled “unsubscribeFromAll”Boolean
Silence everything, or lift that silence.
MarketingConsentPayload
Section titled “MarketingConsentPayload”What customerMarketingConsentUpdate returns.
marketingConsent
Section titled “marketingConsent”MarketingConsent
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
WishlistItem
Section titled “WishlistItem”A product the buyer saved.
Carries enough to draw a card without a second request — handle, title, image, price, availability — and no more. For the full product, query the Storefront API by handle: that surface is public and CDN-cacheable, and re-serving the catalogue through an authenticated endpoint would make every buyer’s wishlist page miss the cache.
ID!
No description.
productId
Section titled “productId”ID!
The product’s id in the Storefront API. Stable across handle changes.
handle
Section titled “handle”Handle!
The product’s slug, for building a link and for querying the Storefront API.
String!
The product’s title when last seen, in the current locale.
Image
The product’s image when last seen.
Carries its own transform argument and placeholder — a wishlist is a grid of images on a connection that may be throttled.
Money
The lowest current price across the product’s variants.
Current, not the price when saved — comparing the two is what a price-drop notification would need, and that is deferred.
availableForSale
Section titled “availableForSale”Boolean!
Whether anything can be bought right now.
active
Section titled “active”Boolean!
Whether the product still exists and is published.
False for a product the merchant has since removed. The item is kept rather than silently dropped, so the buyer sees what happened instead of finding their list shorter than they left it.
variantId
Section titled “variantId”ID
The variant the buyer saved, when they saved a specific one.
variantTitle
Section titled “variantTitle”String
The variant’s name — آبی / XL. Null when no variant was specified.
savedAt
Section titled “savedAt”DateTime!
No description.
WishlistItemConnection
Section titled “WishlistItemConnection”A page of wishlist items.
[WishlistItemEdge!]!
No description.
[WishlistItem!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”Int!
No description.
WishlistItemEdge
Section titled “WishlistItemEdge”One wishlist item, with its cursor.
cursor
Section titled “cursor”String!
No description.
WishlistItem!
No description.
WishlistPayload
Section titled “WishlistPayload”What the wishlist mutations return.
WishlistItem
The item after the operation, or null when it was removed.
totalCount
Section titled “totalCount”Int!
How many items the list now holds, so a header badge updates without paging.
userErrors
Section titled “userErrors”[UserError!]!
No description.