Skip to content
Select theme
Light
Dark
Auto
Select language
English
فارسی

Customer

Object

What the address mutations return.

Address

The address after the operation, or null when it was deleted or not found.

Customer

The buyer, so a re-render sees the new book and the new default.

[UserError!]!

No description.

Object

Consent for one channel.

MarketingChannel!

No description.

Boolean!

Whether the buyer has opted in.

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.

String

Where the opt-in happened — checkout, footer, account.

Object

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.

String

Given name — نام. Null until the buyer gives one.

String

Family name — نام خانوادگی.

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.

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.

AddressConnection!

The saved address book, newest first.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.
lastIntNo description.
beforeStringNo description.

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.

[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.

OrderConnection!

The buyer’s orders, newest first.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.
lastIntNo description.
beforeStringNo description.
sortKeyOrderSortKeys · default "PLACED_AT"No description.
reverseBoolean · default trueNo description.
financialStatusOrderFinancialStatusNo description.
fulfillmentStatusOrderFulfillmentStatusNo description.
queryStringNo description.

Order

One of the buyer’s orders, by id or by order number. Supply exactly one.

ArgumentTypeMeaning
idIDNo description.
numberStringNo description.

WishlistItemConnection!

Products the buyer saved — علاقه‌مندی‌ها.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.
lastIntNo description.
beforeStringNo description.

[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.

ArgumentTypeMeaning
productIds[ID!]!No description.

MarketingConsent!

What the buyer has agreed to be contacted on.

[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.

[DataRequest!]!

Outstanding export and deletion requests. Empty when there are none.

DateTime!

When the account was created — the first successful verification.

DateTime!

No description.

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.

ArgumentTypeMeaning
namespaceStringNo description.
keyString!No description.

[Metafield]!

No description.

ArgumentTypeMeaning
identifiers[MetafieldIdentifier!]!No description.
Object

What the profile mutations return.

Customer

No description.

[UserError!]!

No description.

Input

What the buyer may change about themselves.

String

No description.

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.

Object

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.

DateTime

When url stops working: minutes from now.

[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.

Object

A buyer’s request to receive or erase their data.

ID!

No description.

DataRequestKind!

Which kind.

DataRequestStatus!

Where it has got to.

DateTime!

When it was raised.

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.

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.

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.

UserErrorCode

Why it was refused, as a code from the shared catalogue.

Enum

Which kind of data request.

ValueMeaning
EXPORTSend me everything you hold about me.
ERASUREErase 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.
Object

What the data-request mutations return.

DataRequest

No description.

[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.

Enum

Where a data request has got to.

ValueMeaning
PENDINGRaised, not yet started.
PROCESSINGBeing assembled or applied.
READYAn export is ready to download, until downloadExpiresAt.
COMPLETEDAn erasure has been applied; or an export was downloaded, or its time to be downloaded passed, and its file is gone.
CANCELLEDAn erasure withdrawn by the buyer during the grace period; or an export the shop closed on, or the buyer’s erasure ended.
REJECTEDRefused; rejectionCode says why.
Enum

Who an official invoice is issued to.

The buyer classes سامانه مودیان recognises.

ValueMeaning
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.
Object

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 — “شرکت”, “خودم”.

InvoiceBuyerType!

What kind of buyer the invoice is issued to.

String!

The name to issue it to — a person’s or a company’s.

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.

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.

String

کد اقتصادی. Legal entities only.

String

شماره ثبت. Legal entities only.

Address

The registered address the invoice is issued to.

Boolean!

Whether checkout preselects this one.

DateTime!

No description.

DateTime!

No description.

Input

An invoice identity as the buyer supplies it.

String

No description.

InvoiceBuyerType!

No description.

String!

No description.

String!

No description.

String

No description.

String

No description.

ID

An address from the buyer’s own book. Must belong to them.

Object

What the invoice-profile mutations return.

InvoiceProfile

No description.

Customer

No description.

[UserError!]!

No description.

Enum

A channel a shop can market on.

ValueMeaning
SMSSMS — the channel that reaches everyone here.
EMAILNo description.
PUSHA web push subscription.
Object

What the buyer has agreed to be contacted on, and when they agreed.

[ChannelConsent!]!

One entry per channel the shop can use, opted in or not.

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.

Input

A change to marketing consent.

[MarketingChannel!]

Channels to opt into. Channels named in neither list are left alone.

[MarketingChannel!]

Channels to opt out of.

Boolean

Silence everything, or lift that silence.

Object

What customerMarketingConsentUpdate returns.

MarketingConsent

No description.

[UserError!]!

No description.

Object

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.

ID!

The product’s id in the Storefront API. Stable across handle changes.

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.

Boolean!

Whether anything can be bought right now.

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.

ID

The variant the buyer saved, when they saved a specific one.

String

The variant’s name — آبی / XL. Null when no variant was specified.

DateTime!

No description.

Object

A page of wishlist items.

[WishlistItemEdge!]!

No description.

[WishlistItem!]!

No description.

PageInfo!

No description.

Int!

No description.

Object

One wishlist item, with its cursor.

String!

No description.

WishlistItem!

No description.

Object

What the wishlist mutations return.

WishlistItem

The item after the operation, or null when it was removed.

Int!

How many items the list now holds, so a header badge updates without paging.

[UserError!]!

No description.